Set

Examples of Set

SET assigns values to variables or to a selected portion of a variable.

The format of the SET command is:

        S[ET][:tvexpr] glvn|$EXTRACT()|$PIECE()|(glvn[,...])=expr[,...]
      

Because GT.M does not require predeclaration or typing of variables, a SET withproper syntax always succeeds regardless of the prior state or value of the variable, as long as GT.M can evaluate the expression to the right of the equal sign (=).

For more information on syntax for $PIECE(), refer to the "Functions" chapter in this manual.