User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gams:how_can_i_access_environment_variables_inside_gams [2007/02/02 16:47] external edit
— (current)
Line 1: Line 1:
-====== How can I access environment variables inside GAMS ====== 
-Unfortunately,​ there is no direct way of accessing the 
-environment variables inside GAMS, but we can create an  
-include file on the fly that sets GAMS macros which contain ​ 
-the settings of an system environment variable: 
-For Windows: 
-$echon '​$setglobal WINDIR ' ​ > setwindir 
-$call echo %WINDIR% ​        >>​ setwindir 
-$include setwindir 
-display "​%windir%";​ 
-For Unix: 
-$echon '​$setglobal USER ' ​   > setuser 
-$call echo $USER            >> setuser 
-$include setuser 
-display "​%USER%"​ 
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/how_can_i_access_environment_variables_inside_gams.1170431277.txt.gz ยท Last modified: 2008/05/15 10:22 (external edit)