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



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

EnvStr

Return environment variable by index

Declaration

Source position: dosh.inc line 124

function EnvStr(

  Index: LongInt

):String;

Description

EnvStr returns the Index-th Name=Value pair from the list of environment variables. The index of the first pair is zero.

Errors

The length is limited to 255 characters.

See also

EnvCount

  

Return the number of environment variables

GetEnv

  

Get environment variable by name.

Example

Program Example13;
uses Dos;

{ Program to demonstrate the EnvCount and EnvStr function. }

var
  i : Longint;
begin
  WriteLn('Current Environment is:');
  for i:=1 to EnvCount do
   WriteLn(EnvStr(i));
end.

Notes

 No notes exist for this page yet. 





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