Control Structures

Top  Previous  Next

There is a class of statements in GAMS that control the number of times a group of statements are executed.  The If syntax controls whether a single use occurs.  The For, While, Loop and Repeat statements permit multiple executions of a set of statements.  Each is discussed here.

 

If, Else, and Elseif

Loop

While

For, To, Downto, and By

Repeat, Until