Endwhile

Top  Previous  Next

Ordinarily, While statements are of the form

 

While(conditional,

  statements ;

) ;

 

and when $Onend is specified the statement becomes

 

$Onend

While conditional then

     statements ;

Endif;

Example:

(control.gms)

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

 

While(x<10,

    x=x+0.01;

     );

$Onend

While x<10 do

     x=x+0.01;

    Endwhile;