help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[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.

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.

Errors

If there is no environment, an empty string is returned.

See also

GetEnvironmentVariable

  

Return the value of an environment variable.

GetEnvironmentVariableCount

  

Return the number of variables in the environment.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505