GETENV$ |
getenv$ allows you to read the value of an environment variable (updated in the shell that launched the corresponding Adonix process).
getenv$(varnam_exp)
|
Element |
Description |
Restrictions |
|
varnam_exp |
Expression of the Char type that results in an environment variable name |
None |
# What is the name of the TERM variable in the environment?VAR_TERM = getenv$("TERM")
getenv$ retrieves the value of a variable given in the environment that launched Adonix in a variable of the Char type.
If the environment variable that corresponds to varnam_exp does not exist, the empty string ("") is returned without any errors. Under Windows 95 and Windows NT, if the environment variable does not exist, Adonix will look for it in the "registry."
The
following environment variables are tested the most often:
PATH, TMPDIR, SHELL, LOGNAME, HOME, etc.
The
creation and utilization of such variables will be performed under a
traditional shell, e.g., the Bourne shell, with the following operations:
VARNAM=value
VARNAM export
Adonix ....
Connected
under Adonix, you will then be able to write the following in a process:
ENVVAR="VARNAM"
CH1 = getenv$(ENVVAR)
|
Error |
Description |
|
ERMODE (10) |
The parameter is not of the Char type. |
|
|