[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Return an environment variable by index.
Source position: osutilsh.inc line 27
function GetEnvironmentString( |
Index: Integer |
):AnsiString; |
GetEnvironmentString returns the Index-th environment variable. The index is 1 based, and is bounded from above by the result of GetEnvironmentVariableCount.
For an example, GetEnvironmentVariableCount.
Remark: | Note that on Windows, environment strings can start with an equal sign (=). This is a trick used to pass the current working directory to a newly created proces. In this case, extracting the variable name as the characters before the first equal sign will result in an empty name. |
If there is no environment, an empty string is returned.
|
Return the value of an environment variable. |
|
|
Return the number of variables in the environment. |