next up previous contents index
Next: GetEpochTime Up: Functions and procedures Previous: GetEUid

GetEnv

   

Declaration:

Function GetEnv (P : String) : PChar;

Description:

Returns the value of the environment variable in P. If the variable is not defined, nil is returned. The value of the environment variable may be the empty string.

A PChar is returned to accomodate for strings longer than 255 bytes, TERMCAP and LS_COLORS, for instance.

Errors:

None.

See also:

sh (1), csh (1)

Example
Program Example41;

{ Program to demonstrate the GetEnv function. }

Uses linux;

begin
  Writeln ('Path is : ',Getenv('PATH'));
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998