- Procedure EnvironmentGetString(Key, Value)
With the procedure
EnvironmentGetString you can obtain the string
representation of an environment setting, either set by the process
calling AIMMS or by AIMMS itself.
EnvironmentGetString( Key, ! (input) scalar string expression Value ! (output) scalar string parameter )
A string expression holding the name of the environment variable.
A scalar string parameter that, on return, contains the string representation of the current value of the environment variable.
The procedure returns 1 if the variable
Keyis available, and 0 otherwise.
The environment variables defined by AIMMS itself are:
Examples of environment variables available on a Windows system are
USERNAME. Entering the MSDOS command
seton an MSDOS prompt will present you with the set of available environment variables on a Windows system. Via the control panel tool
systemand then going to
Advanced system settings-
Environment variablesbutton, you can manipulate the set of environment variables.
On Linux systems a distinction is made between the variables kept to a process itself, and those exported to the environment of all its child processes. In a bash shell you can obtain the collection of variables set via the bash
setcommand, and the subset of all exported environment variables via the bash
envcommand. In order to make a variable available to the environment, you will have to explicitly place it in the environment, via an
exportcommand. In several system wide bash scripts,
/etc/bashrc, or user startup bash scripts,
~/.bashrc, export commands such as:
export HOSTNAME export OSTYPE
can be found in order to make these useful environment variables available to all processes executed.