Next: GETGID, Previous: GETENV, Up: Intrinsic Procedures
GET_ENVIRONMENT_VARIABLE
— Get an environmental variableCALL GET_ENVIRONMENT_VARIABLE(NAME[, VALUE, LENGTH, STATUS, TRIM_NAME)
NAME | Shall be a scalar of type CHARACTER
and of default kind.
|
VALUE | Shall be a scalar of type CHARACTER
and of default kind.
|
LENGTH | Shall be a scalar of type INTEGER
and of default kind.
|
STATUS | Shall be a scalar of type INTEGER
and of default kind.
|
TRIM_NAME | Shall be a scalar of type LOGICAL
and of default kind.
|
.FALSE.
, the trailing blanks in NAME
are significant; otherwise they are not part of the environment variable
name.
PROGRAM test_getenv CHARACTER(len=255) :: homedir CALL get_environment_variable("HOME", homedir) WRITE (*,*) TRIM(homedir) END PROGRAM