[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

GetEnvironmentString

Return an environment variable by index.

Declaration

Source position: osutilsh.inc line 23

function GetEnvironmentString(

  Index: Integer

):String;

Description

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.

Errors

If there is no environment, -1 may be returned.

See also

GetEnvironmentVariable

  

Return the value of an environment variable.

GetEnvironmentVariableCount

  

Return the number of variables in the environment.