Escape

Top  Previous  Next

Allows one to print out or display the text sequence for the % syntax used in setting off control variables, system attributes, GAMS command line parameters and arguments in include files.  It is employed using the syntax

 

$escape symbol

 

This renders all subsequent commands of the form %symbol to not have parameter substitution done for them and on display or in a put to come out as just a %.

For example (escape.gms)

 

$escape &

 

will make %&controlvariable%& print out in a display or put as %controlvariable%. while %&1 will print out as %1.  This is really only present to allow one to be able to write GAMS instructions from GAMS as one would not be able to use a put to write the symbols %gams.ps% otherwise.

One may reverse this action with

 

$escape %