Subfunction Problem

Sep 7, 2009 at 6:24 PM

Hi

I have a problem working with sub functions. while Expression("Sma([x],20)") works, Expression("Sma(Sma([x],20)-[y]),20)") does not.

It seems that the parse does not parse from inside out for each single function.

Eval Expression(Sma(Sma([1],[2],1),20,1) *2) : Function not found
Parameter name: Sma :    at Evaluant.Calculator.Domain.EvaluationVisitor.Visit(Function function)
   at Evaluant.Calculator.Domain.Function.Accept(LogicalExpressionVisitor visitor)
   at Evaluant.Calculator.Domain.EvaluationVisitor.Visit(BinaryExpression expression)
   at Evaluant.Calculator.Domain.BinaryExpression.Accept(LogicalExpressionVisitor visitor)
   at Evaluant.Calculator.Expression.Evaluate()

But its also possible, that I made some mistakes. In this case I would ask you for a small peace of working code. Of course I could send you mine, but its reaaallly big and not easy to workout what I am doing :-)

Thanks
Chris

Coordinator
Sep 7, 2009 at 9:59 PM

It's ok, I found the issue and published a new release to correct it. Another user sent me teh same issue the same day, couldn't make you wait more.

Sep 8, 2009 at 5:36 AM

sorry, just wrote you after seekeing and probing for hours ;-)

but thank you very much, for doing this quite fast fixes!

chris