ezeio2:scriptref:eval

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ezeio2:scriptref:eval [2023-11-30 17:56] – created andrehezeio2:scriptref:eval [2023-11-30 18:00] (current) andreh
Line 1: Line 1:
 ==== Eval ==== ==== Eval ====
  
-Evaluates the supplies string using the expression parser+Evaluates the supplied string using the expression parser
  
 === Description === === Description ===
  
-<code>Float:Eval( string )</code>+<code>Float:Eval( const string[] )</code>
  
 Return the resulting value. If the expression is invalid, the return value is zero (0.000) Return the resulting value. If the expression is invalid, the return value is zero (0.000)
Line 23: Line 23:
 <code javascript>     <code javascript>    
  
-   new Float:f = Eval( "12.34-2.34" );   +   new Float:f; 
 +    
 +   f = Eval( "12.34-2.34" );   
    // The value of f is now 10.00    // 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.
  
 </code> </code>
  
 <wrap hi>NOTE: First appeared in firmware 23112801</wrap> <wrap hi>NOTE: First appeared in firmware 23112801</wrap>
  • ezeio2/scriptref/eval.1701367016.txt.gz
  • Last modified: 2023-11-30 17:56
  • by andreh