Eval
Evaluates the supplied string using the expression parser
Description
Float:Eval( const string[] )
Return the resulting value. If the expression is invalid, the return value is zero (0.000)
NOTE: The Eval script function does not support tags.
Parameters
string | Expression string to be evaluated |
Return value
Floating point value of the expression after evaluation.
Example usage
new Float:f; f = Eval( "12.34-2.34" ); // The value of f is now 10.00 f = Eval( "f(1)>f(2)" ); // If the value of field 1 is larger than the value of field 2, f=1.000. Otherwise f=0.000.
NOTE: First appeared in firmware 23112801