dm_env Module

Module for reading environment variables.


Uses

  • module~~dm_env~~UsesGraph module~dm_env dm_env module~dm_error dm_error module~dm_env->module~dm_error module~dm_kind dm_kind module~dm_env->module~dm_kind module~dm_string dm_string module~dm_env->module~dm_string module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_string->module~dm_error module~dm_string->module~dm_kind

Used by

  • module~~dm_env~~UsedByGraph module~dm_env dm_env module~dmpack dmpack module~dmpack->module~dm_env proc~dm_test_skip dm_test_skip proc~dm_test_skip->module~dm_env

Interfaces

public interface dm_env_get

Generic environment variable access.

  • 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


Functions

public function dm_env_has(name) result(has)

Returns .true. if the environment variable of the given name exists and has a value.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Variable name.

Return Value logical