Forms of conditionals

Top  Previous  Next

The conditionals used in $If and $Ifi statements can be of many forms.  The principal ones involve:

Comparisons involving control variables or environment variables testing whether a variable is defined or whether its contents match a string.
Characteristics of a named item testing its type, set dependency or declaration status.
GAMS command line parameters including user defined options.
The settings of system characteristics.
Batinclude parameters testing existence, contents, declaration status, or type.
Error checks.
File existence status.

Each is discussed below.

 

Based on control and environment variables

Based on characteristics of named item or parameter

Passed parameter existence

Based on GAMS command line parameters

Based on system characteristics

Based on error and warning checks

Based on file existence

Based on put file status