5 Environment Library

The Environment Library contains a single pattern expandEnvVar. ExpandEnvVar enables the user to look up variables in the process environment.

ExpandEnvVar is used like this:

Program 1: Using expandEnvVar

(# var:^text;
do 'TMP'->var[];
        (# defaultvalue::
           (# do 'c:\windows\temp'->envvarvalue[]
In this example, the environment variable TMP is looked up in the environment. If TMP was not defined the value 'c:\windows\temp' is used as default value. The value found is printed using screen.putline.

Generaly, if the environment variable is not found in the environment defaultvalue can be used to specify a value. Note that the defaultvalue is not set in the process environment.

System Utilities - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Friday September 29th 2000 at 23:36]