sklose / NCalc2

expression evaluator for .NET with built-in compiler
MIT License
170 stars 58 forks source link

if function with int and double parameters #42

Closed deltex80 closed 4 years ago

deltex80 commented 4 years ago

When using the if function in compiled mode I get the error: 'cannot be evaluated due this error: Argument types do not match' with expressions like if(true, 1, 0.0) While in interpreted mode this is evaluated correctly. I tried to write an overload of the function in my context object that takes an int and double as parameters but that didn't do the trick. Is it possible to add support for expressions like this? Thanks