GAMS [ Home | Support | Sales | Solvers | Documentation | Model Libraries | Search | Contact Us ]

ifthen6.gms : $ifthen/elseif false without sameline


The $if statement syntax allows for a missing command

$if condition  true_line

or
$if condition
true_line

This is not allowed with $ifthen or $elseif. We cannot skip the next line
if we have no true_line and condition=FALSE.

Contributor: Alex

Small Model of Type: GAMS
$title $ifthen/elseif false without sameline (IFTHEN6,SEQ=478) $ontext The $if statement syntax allows for a missing command $if condition true_line or $if condition true_line This is not allowed with $ifthen or $elseif. We cannot skip the next line if we have no true_line and condition=FALSE. Contributor: Alex $offtext $set opt X $ifthen '%opt%'==u $elseif '%opt%'==uv $elseif '%opt%'==ua $elseif '%opt%'==uav $elseif '%opt%'==cplex $else $error --opt=%opt% but should be u|uv|ua|uav|cplex $endif $if errorfree $abort *** skipped input lines $clearerrors