- 4.24.2.17. -
Table of Contents
4. Standard Units
4.24. DOS - MSDOS support unit
4.24.2. DOS Unit Procedures and Functions
4.24.2.17. GetEnv
4.24.2.17. GetEnv
Targets: MS-DOS, OS/2, Win32
Dos Unit
Returns the value of a specified environment variable.
Declaration:
function GetEnv(VarName: string): string;
Remarks:
VarName is the name of the variable to retrieve. If VarName
does not exist as an environment variable then an empty string is returned.
GetEnv returns the string assigned to the environment variable.
Example:
s := GetEnv('COMSPEC'); // Returns COMSPEC
- 4.24.2.17. -