- 4.24.2.8 -
Standard Units
Dos Unit
Dos Unit Procedures and FunctionsEnvStr function
Targets: MS-DOS, OS/2, Win32
Dos Unit
Returns a specified environment string.
Declaration:
function EnvStr(Index: Integer): string;
Remarks:
Index is the number of the environment variable, for instance,
the first variable is one, second is two, and so on. An invalid index
returns an empty string.
EnvStr returns a string in the form of (VarName=String).
If the order of system environment variables is unknown then use
GetEnv to retrieve a variable by name.
Example:
uses
Dos;
var
i : Integer;
begin
for i := 1 to EnvCount do
WriteLn(EnvStr(i));
end.
See also:
EnvCount
GetEnv
|
|
|
EnvCount function |
Table of Content |
Exec procedure |
- 4.24.2.8 -