dm_env_get Interface

public interface dm_env_get

Generic environment variable access.

Called by

interface~~dm_env_get~~CalledByGraph interface~dm_env_get dm_env_get proc~dm_test_skip dm_test_skip proc~dm_test_skip->interface~dm_env_get

Module Procedures

private function env_get_allocatable(name, value, default, exists) result(rc)

Returns environment variable as allocatable string in value, with optional default value from default if the variable does not exist.

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_int32(name, value, default, exists) result(rc)

Returns environment variable as 4-byte integer in value, with optional default value from default if the variable does not exist.

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_int64(name, value, default, exists) result(rc)

Returns environment variable as 8-byte integer in value, with optional default value from default if the variable does not exist.

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_logical(name, value, default, exists) result(rc)

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..

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_real32(name, value, default, exists) result(rc)

Returns environment variable as 4-byte real in value, with optional default value from default if the variable does not exist.

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_real64(name, value, default, exists) result(rc)

Returns environment variable as 8-byte real in value, with optional default value from default if the variable does not exist.

Arguments

Type IntentOptional 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.

Return Value integer

private function env_get_string(name, value, n, exists) result(rc)

Returns environment variable as string in value and string length in n.

Arguments

Type IntentOptional 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.

Return Value integer