Next Previous Contents

41. getenv

Synopsis

Get the value of an environment variable

Usage

String_Type getenv(String_Type var)

Description

The getenv function returns a string that represents the value of an environment variable var. It will return NULL if there is no environment variable whose name is given by var.

Example

    if (NULL != getenv ("USE_COLOR"))
      {
        set_color ("normal", "white", "blue");
        set_color ("status", "black", "gray");
        USE_ANSI_COLORS = 1;
      }
See Also

putenv, strlen, is_defined


Next Previous Contents