Previous: 4.24.2.16. GetDate To the Table of Contents Next: 4.24.2.18. GetFAttr
4.24.2.16. GetDate Table of Contents 4.24.2.18. GetFAttr

- 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







Previous: 4.24.2.16. GetDate To the Table of Contents Next: 4.24.2.18. GetFAttr
4.24.2.16. GetDate Table of Contents 4.24.2.18. GetFAttr

- 4.24.2.17. -