SET Command¶
Material prepared from M Programming Book [WALTERS1997] (Page 38-39, 75-78) and GT.M Programmer’s Guide
Description¶
S[ET] variable=expression
Examples¶
SET NAME="Thomas Jefferson"
Notes¶
SET
assigns the value of the expression to the variable, creating it if it
does not exist.
SET
can also be used to set multiple variables to the same value.
SET (X,Y,Z)=12
Multiple SET
commands can be combined into one using commas.
SET X=5,Y=X+5,Z=Y-1
Notice that later parts of theSET
command can reference variables created in the earlier parts.