Flee
Flee copied to clipboard
List of built-in functions and operators
Is it possible to get a comprehensive list of the built-in functions and operators? I have seen from some of the answered questions that "if" is not available by default. It would be helpful to know what else would need to be implemented for our purposes.
I would also like to know which operators are supported, so far I have determined that the following is supported:
a + b b - a (a+b)*c+(d/3) a^2
AND OR
>
<
<>
True
False
if you do:
context.Imports.AddType(typeof(Math));
then you will also add support for Math operators like
log(a)
sqrt(a^2 + b^2)
min(a,b)
max(b,a)
I also concluded that you can do If clauses like so: If(b>2.5,c,d) this is much like Excel if clauses, so it should be fairly familiar to many people
See https://www.codeproject.com/Articles/19768/Flee-Fast-Lightweight-Expression-Evaluator. It's slightly out of date, as I needed to use ; instead of , for the if statement, but it seems like a good starting point.
@Allsetra-RB
I needed to use ; instead of , for the if statement, but it seems like a good starting point.
Thanks for this information. It must be added to the documentation. Because test also has , insted of ;. https://github.com/mparlak/Flee/blob/97b5b7246671a49e82a0a6fd84dfc0ad5706d557/test/Flee.Test/TestScripts/ValidExpressions.txt