set3.gms : $set and $drop scoping

Description


Small Model of Type : GAMS


Category : GAMS Test library


Main file : set3.gms

$title $set and $drop scoping (SET3,SEQ=40)
$if set       a $error a scoped should be undefined
$if setlocal  a $error a local  should be undefined
$if setglobal a $error a global should be undefined

$setGlobal    a 'this is global a'

$if NOT set       a $error a is defined if local scoped or global
$if     setlocal  a $error a local should be undefined
$if NOT setglobal a $error a global should be defined

$setLocal     a 'this is local a'

$if NOT set       a $error a is defined if local scoped or global
$if NOT setlocal  a $error a local should be defined
$if NOT setglobal a $error a global should be defined

$set          a 'this is scoped a'

$if NOT set       a $error a is defined if local scoped or global
$if NOT setlocal  a $error a local should be defined
$if NOT setglobal a $error a global should be defined

$show

$drop      a
$dropLocal a

$if NOT set       a $error a is defined if local scoped or global
$if     setlocal  a $error a local should be undefined
$if NOT setglobal a $error a global should be defined

$show

$dropGlobal a

$if set       a $error a scoped should be undefined
$if setlocal  a $error a local  should be undefined
$if setglobal a $error a global should be undefined

$show