Differences

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

Link to this comparison view

Both sides previous revision Previous revision
software:vrgrid:scripting [2019/05/03 23:46]
ptsource
software:vrgrid:scripting [2019/05/03 23:49] (current)
ptsource
Line 49: Line 49:
 /* text between slash-asterix is ignored, /* text between slash-asterix is ignored,
 even on multiple lines */ even on multiple lines */
 +------
 Syntax Syntax
 A single statement may be spread over multiple lines. All statements must end in a semi-colon. A single statement may be spread over multiple lines. All statements must end in a semi-colon.
 +------
 Operators Operators
 Mathematical Mathematical
Line 66: Line 67:
 Assignment Assignment
 x = y x = y
 +------
 Comparison Comparison
 Equality Equality
Line 80: Line 81:
 Less Than or Equal To Less Than or Equal To
 x le y x le y
- +------
 Logical Logical
 AND AND
Line 89: Line 89:
 NOT (negation) NOT (negation)
 not x not x
 +------
 String Concatenation String Concatenation
 myString = "​My"​ # "​String"​ myString = "​My"​ # "​String"​
 +------
 Statements Statements
 Compound Compound
 { {
- 
 do this; do this;
 do that; do that;
 } }
 +
 If-Else If-Else
 if ( expression ) if ( expression )
Line 105: Line 105:
 else else
 { do that } { do that }
 +
 Switch-Case Switch-Case
 switch (x) switch (x)
Line 112: Line 113:
 default { do default } default { do default }
 } }
 +
 While-Do loop While-Do loop
 while ( expression ) { do this } while ( expression ) { do this }
 +
 Do-While loop Do-While loop
 do { do this } while ( expression ) do { do this } while ( expression )
 +
 For loop For loop
 for loopvar = startval to endval { do this } for loopvar = startval to endval { do this }
 <!-- or --> <!-- or -->
 for loopvar = startval to endval step stepval { do this } for loopvar = startval to endval step stepval { do this }
 +
 For-Each loop For-Each loop
 for each item in collection { do this with item } for each item in collection { do this with item }