1

Closed

Function Calls: Evaluation Precedence is Wrong

description

Evaluation is correct for
MyRound( amount*rate , MyPrecision( currrency ))
 
But not
MyRound( MyConversion( amount, rate ) , MyPrecision( currrency ) )
 
At debugging
MyRound() is evaluate with parameters { amount , rate } ??
 
Thanks for your attention!
Closed May 15, 2008 at 3:16 PM by activa
No issue

comments

activa wrote Mar 28, 2008 at 7:22 PM

I have tried this and cannot reproduce the problem. I added this specific test in the unit tests, and it passed. Maybe you can try the latest release (v0.9.4). It will be published in a few minutes.

wrote Mar 28, 2008 at 7:22 PM

jmptrader wrote Mar 31, 2008 at 4:15 PM

OK. You have reason. It my mistake. Sorry.

But Ctx.Add(...) allowed duplicated. by example:

this.Ctx.AddFunction("MYROUND", typeof(Util.MathEx), "MYROUND");
this.Ctx.AddFunction("DIV",typeof(Util.MathEx), "MYROUND"); // It my mistake Nº1
this.Ctx.AddFunction("MYROUND", typeof(Util.MathEx), "MYROUND"); // It my mistake Nª2

an Handling Exception is required....

Thanks for your attention!

activa wrote Apr 1, 2008 at 7:05 AM

It's perfectly ok to add the same function name twice, because it should be possible to change the function between function evaluations. It's the responsibility of the developer to ensure that 2 different functions are not added with the same name.

wrote May 15, 2008 at 3:16 PM

wrote Feb 12, 2013 at 8:26 PM

wrote May 15, 2013 at 3:06 AM