ifthen6.gms : $ifThen/elseif false without sameline

Description

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


Category : GAMS Test library


Main file : ifthen6.gms

$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