User Tools

Site Tools


scripting:syntax

Differences

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

Link to this comparison view

Next revision
Previous revision
scripting:syntax [2012/03/23 02:42] – created mitscripting:syntax [2025/05/28 16:34] (current) – external edit 127.0.0.1
Line 5: Line 5:
   * Each line of script needs to be put on a new line   * Each line of script needs to be put on a new line
   * All script code is case-insensitive. (e.g. the variable 'a' is the same as the variable 'A' )   * All script code is case-insensitive. (e.g. the variable 'a' is the same as the variable 'A' )
 +  * All variables are preceeded with $
  
 ===== Conditional Statements ===== ===== Conditional Statements =====
Line 24: Line 24:
 </codedoc> </codedoc>
  
- +Supported conditions inside an ''if'' or ''else if'' are: 
 +  * ''=''  (or ''=='' )  
 +  * ''<'' 
 +  * ''>''  
 +  * ''!=''   (or ''<>'' )  
 +  * ''<=''  ('' < = '' )   
 +  * ''>=''
  
-TBD+===== Comments =====
  
- +Code comments are simple C-stylee, e.g  
 +<codedoc> 
 +    // Check the item number 
 +    if ( $itemNum = 112 )  
 +    { 
 +//      *say Nothing (this line is commented out) 
 +    } 
 +</codedoc>
  
-Comments+===== Maths operators =====
  
- +Basic maths operators are supported in simple form. Compound operations are not yet supported so each line needs to be kept basic, e.g. :
  
-TBD +<codedoc> 
- +     $var = $var + 1 
- +     $newvar = $var * 100 
 +</codedoc>
  
- +Currently only the 4 basic operators ( '+', '-', '/', '*' ) are supported.
  
-  
  
  
scripting/syntax.1332470549.txt.gz · Last modified: (external edit)