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

# GetEnv

Return value of environment variable.

## Declaration

Source position: oldlinux.pp line 1470

`function GetEnv(`
`P: string`
`):Pchar;`

## Description

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

## Example

    Program Example41;

    { Program to demonstrate the GetEnv function. }

    Uses oldlinux;

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

Documentation generated on: Feb 26 2014