Problem in Expression Evaluation

Jan 27, 2010 at 5:35 AM
Edited Jan 27, 2010 at 5:36 AM

Hi Sebastien,

I have a winform through which i enter the variable name, variable value and expression containing these variables and on click of a button i show the expression result in a label.

If i have two variables: a= 2, b=5 and expression is "a + b" then result is 7.

My question is that  Can i evaluate expression "a = a + b"? Result should be a = 7 in this case.

In current case if i write expression "a = a + b" then it shows result 'false'.

Please help me.






Feb 27, 2010 at 6:39 AM

Hi Abhishek,

Actually this is not the intent of NCalc. Though, we have made another library which can do that. It's It's a Javascript interpreter. It works the same as Ncalc, bbut it is able to execute statements, and thus assign variables among many other things.