bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
ENVIRON$ Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Syntax 1
ENVIRON$ (environmentstring$)
Syntax 2
ENVIRON$ (n)
■ The argument environmentstring$ is a string constant or variable
that contains the name of an environment variable. The name of the
environment variable must be uppercase. For example, ENVIRON$ ("PATH")
returns the PATH environment variable; ENVIRON$ ("path") returns a
null string.
Usage Notes
■ If you specify an environment-string name, but it cannot be found
in the environment-string table, or there is no text following it,
then ENVIRON$ returns a null string. Otherwise, ENVIRON$ returns
the text following the equal sign in the environment-string table.
■ If you specify a numeric argument (n), the nth string in the
environment-string table is returned. In this case, the string
includes all of the text, including environmentstring$. If the nth
does not exist, ENVIRON$ returns a null string. The n argument can
be any numeric expression; it is rounded to an integer.