CUBE Voyager
All statements follow the same general structure:
Some KEYWORDs automatically invoke the associated COMMAND
KEYWORDs are always followed by an equal sign and a VALUE
The VALUE may be the result of an expression or computation
E.g.:
Continuation characters (commas, equals signs, any operator) distribute statements across multiple lines
E.g.:
Operators:
+ addition || logical OR
- subtraction && logical AND
* multiplication ==, = equals
/ division !=, <> does not equal
% modulus >= greater than or equal to
^ exponentiation <= less than or equal to
() parentheses > greater than
< less than
Numeric functions:
ABS, INT, ROUND, MAX, MIN, EXP, LN, LOG, POW, SQRT, RAND, RANDOM, RANDSEE
Trigonometric functions:
COS, ARCCOS, SIN, ARCSIN, TAN, ARCTAN, …
CmpNumRetNum(V1,OP,V2,R1,R2) = compare V1 with V2 through OP (Operator) and return R1 if true or R2 if false
Hint: {+Cntr+space to show catalog keys
Example:
A=1 ;command followed by comment
;comment line here
A=1 /* comments start here…
…
… comments end here */
B=2
Hint: Include plenty of comments for yourself and others
The print file must be specified as below:
The variable to be printed must be stated as below:
Where w = variable total width and d = decimal digits
Good to know:
"\n"— new line control
"\f" — new page control
"\t" — tab control
"\\" — ignore new line control
Tip: Put Markers in big scripts for referencing.
Indentation makes the script more readable