GETENV Function

Returns the specified equivalence string from the environment of the PV‑WAVE process.

Usage

    result = GETENV(name)

Input Parameters

name—The scalar string specifying which equivalence string to return from the environment.

Returned Value

result—The equivalence string for name. If name does not exist in the environment, returns a null string.

Keywords

None.

Discussion

None.

UNIX Examples

This command prints information about the environment:

PRINT, 'Current shell is: ', GETENV('SHELL')

This example shows how to read data from a file in a manner that works on either UNIX systems:

OPENR, u, '$WAVE_DIR/data/heartbeat.dat', /Get_Lun
FREE_LUN, u

Windows Example

This command prints information about the environment:

PRINT, 'Home Drive is: ', GETENV('HOMEDRIVE')

This example shows how to read data using GETENV to obtain part of a file’s pathname:

OPENR, u, GETENV('WAVE_DIR')+ '\data\heartbeat.dat', /Get_Lun
FREE_LUN, u

See Also

ENVIRONMENT,  SETENV