Endif

Top  Previous  Next

Ordinarily Ifs are of the form

 

If(conditional,

  statements ;

) ;

 

and when $Onend is specified the statement becomes

 

$Onend

If conditional then

     statements ;

Endif;

Example:

(control.gms)

The following two commands are equivalent and illustrate the ways the syntax varies.

 

If (x ne 0,

     DATA(I)=12 ;

  );

$Onend

If x ne 0 then

     DATA(I)=12 ;

Endif;