$Set

Top  Previous  Next

Variables defined which are called scoped and are available in the code module where defined and any code included therein, but not anywhere in code that includes the one where the $Set command appears.

They are destroyed using

 $drop varname

Unfortunately GAMS allows one to define scoped local and global variables with the same name but treats them as different under some cases and prioritizes them when using $ife or $if as discussed here.