ezeio2:scriptref: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

  • ezeio2/scriptref/eval.txt
  • Last modified: 2023-11-30 18:00
  • by andreh