GET_ENVIRONMENT_VARIABLE

Platform

Win32 and x64

Purpose

To get the value of an environmental variable.

Syntax

SUBROUTINE GET_ENVIRONMENT_VARIABLE(NAME[, VALUE, LENGTH, STATUS, TRIM_NAME])
CHARACTER(LEN=*) NAME, VALUE
INTEGER LENGTH, STATUS
LOGICAL TRIM_NAME

Description

Stores the value of environment variable NAME in VALUE. If NAME is not available then VALUE is filled with spaces. If VALUE is not large enough then it is truncated.
LENGTH is returned as the length needed to store the value or zero if NAME is not available.

STATUS is returned with the result -1 (present but truncated) or 1 (not available) or 2 (not supported) or zero (success).

If TRIM_NAME is present and .FALSE. then trailing spaces in VALUE reflect trailling spaces in the name.

All aguments other than NAME are optional.

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited