Module for reading environment variables.
Generic environment variable access.
Returns environment variable as allocatable string in value, with
optional default value of trimmed string default if the variable
does not exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| character(len=:), | intent(out), | allocatable | :: | value |
Variable value. |
|
| character(len=*), | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as 4-byte integer in value, with
optional default value from default if the variable does not exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| integer(kind=i4), | intent(out) | :: | value |
Variable value. |
||
| integer(kind=i4), | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as 8-byte integer in value, with
optional default value from default if the variable does not exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| integer(kind=i8), | intent(out) | :: | value |
Variable value. |
||
| integer(kind=i8), | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as logical in value, with optional
default value from default if the variable does not exist. An
integer value greater 0 is interpreted as .true., else .false..
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| logical, | intent(out) | :: | value |
Variable value. |
||
| logical, | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as 4-byte real in value, with optional
default value from default if the variable does not exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| real(kind=r4), | intent(out) | :: | value |
Variable value. |
||
| real(kind=r4), | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as 8-byte real in value, with optional
default value from default if the variable does not exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| real(kind=r8), | intent(out) | :: | value |
Variable value. |
||
| real(kind=r8), | intent(in), | optional | :: | default |
Default value. |
|
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns environment variable as string in value and string
length in n.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |
||
| character(len=*), | intent(inout) | :: | value |
Variable value. |
||
| integer, | intent(out) | :: | n |
Actual length of string. |
||
| logical, | intent(out), | optional | :: | exists |
Variable exists. |
Returns .true. if the environment variable of the given name
exists and has a value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Variable name. |