J3/98-234 page 1 of 2 To: J3 From: R. Bleikamp/JOR Subject: Environment Variable Edits / M.18b Date: 98-11-10 For a history of the previous work in this area, see papers 97-151r1, 97-153, 97-201, 97-203, 98-115, and 98-163r1 (specs). Edits for Environment Variable support in F2000. Add the following in Chapter 13. 13.14.xxx GET_ENVIRONMENT_VARIABLE (name, value [,length] [,trim_name]) Description. Get the value of an environement variable. Class: Subroutine. Arguments: name: shall be scalar and of type default character. It is an INTENT(IN) argument. value: shall be a scalar variable of type default integer. It is an INTENT(OUT) argument. The value of the environment variable specified by "name" is returned in this argument. When the value is shorter than LEN(value), the value is blank padded on the right. When the value is longer than LEN(value), the leftmost LEN(value) characters of the environment variables value will be stored in "value". When the environment variable does not exist, does not have a value, or the processor does not support environment variables, "value" will be assigned all blanks. J3/98-234 page 2 of 2 length (optional): shall be a scalar variable of type default integer. It is an INTENT(OUT) argument. When present, this variable is set to the length of the specified environment variable. When "length" is set to the value -1, the specified environment variable was not present. When "length" is set to the value -2, the processor does not support enviroment variables. The processor may return other other negative values in "length" for other error conditions. When "length" is set to a value of zero, the specified environment variable was present, but had no value. When "length" is set to a positive value, "value" contains the value of the specified environment variable. If the value of "length" is less than LEN(value), "value" is padded on the right with blanks. If "length" is greater than LEN(value), the returned value was truncated from the right. trim_name (optional): shall be a scalar value of type logical. It is an INTENT(IN) argument. When "trim_name" is present with the value false, trailing blanks in "name" are considered significant if the processor supports significant trailing blanks in an environment variable name. Otherwise, trailing blanks in "name" are not considered part of the environment variable's name. Note: an environment variable is a named object, specifiable via some mechanism outside the scope of this standard.