Flee icon indicating copy to clipboard operation
Flee copied to clipboard

List of built-in functions and operators

Open Doc-Saintly opened this issue 5 years ago • 3 comments

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.

Doc-Saintly avatar Mar 26 '19 08:03 Doc-Saintly

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

danieltulp avatar Apr 18 '19 13:04 danieltulp

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 avatar Nov 18 '20 11:11 Allsetra-RB

@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

kostazol avatar Apr 06 '23 04:04 kostazol