stdlib_optval Module

Provides a generic function optval, which can be used to conveniently implement fallback values for optional arguments to subprograms (Specification)

If x is an optional parameter of a subprogram, then the expression optval(x, default) inside that subprogram evaluates to x if it is present, otherwise default.

It is an error to call optval with a single actual argument.


Uses

  • module~~stdlib_optval~~UsesGraph module~stdlib_optval stdlib_optval module~stdlib_kinds stdlib_kinds module~stdlib_optval->module~stdlib_kinds iso_fortran_env iso_fortran_env module~stdlib_kinds->iso_fortran_env iso_c_binding iso_c_binding module~stdlib_kinds->iso_c_binding

Used by

  • module~~stdlib_optval~~UsedByGraph module~stdlib_optval stdlib_optval module~stdlib_stats_corr stdlib_stats_corr module~stdlib_stats_corr->module~stdlib_optval module~stdlib_error stdlib_error module~stdlib_stats_corr->module~stdlib_error module~stdlib_linalg stdlib_linalg module~stdlib_stats_corr->module~stdlib_linalg module~stdlib_stats_median stdlib_stats_median module~stdlib_stats_median->module~stdlib_optval module~stdlib_sorting stdlib_sorting module~stdlib_stats_median->module~stdlib_sorting module~stdlib_stats_median->module~stdlib_error module~stdlib_sorting->module~stdlib_optval module~stdlib_string_type stdlib_string_type module~stdlib_sorting->module~stdlib_string_type module~stdlib_error->module~stdlib_optval module~stdlib_stats_moment_mask stdlib_stats_moment_mask module~stdlib_stats_moment_mask->module~stdlib_optval module~stdlib_stats_moment_mask->module~stdlib_error module~stdlib_stats_var stdlib_stats_var module~stdlib_stats_var->module~stdlib_optval module~stdlib_stats_var->module~stdlib_error module~stdlib_strings stdlib_strings module~stdlib_strings->module~stdlib_optval module~stdlib_strings->module~stdlib_string_type module~stdlib_math stdlib_math module~stdlib_math->module~stdlib_optval module~stdlib_bitsets stdlib_bitsets module~stdlib_bitsets->module~stdlib_optval module~stdlib_io stdlib_io module~stdlib_io->module~stdlib_optval module~stdlib_io->module~stdlib_error module~stdlib_stats_cov stdlib_stats_cov module~stdlib_stats_cov->module~stdlib_optval module~stdlib_stats_cov->module~stdlib_error module~stdlib_random stdlib_random module~stdlib_random->module~stdlib_optval module~stdlib_random->module~stdlib_error module~stdlib_linalg->module~stdlib_optval module~stdlib_logger stdlib_logger module~stdlib_logger->module~stdlib_optval module~stdlib_stats_mean stdlib_stats_mean module~stdlib_stats_mean->module~stdlib_optval module~stdlib_stats_mean->module~stdlib_error module~stdlib_stats_moment_scalar stdlib_stats_moment_scalar module~stdlib_stats_moment_scalar->module~stdlib_optval module~stdlib_stats_moment_scalar->module~stdlib_error module~stdlib_string_type->module~stdlib_optval module~stdlib_stats_moment_all stdlib_stats_moment_all module~stdlib_stats_moment_all->module~stdlib_optval module~stdlib_stats_moment_all->module~stdlib_error module~stdlib_stats_moment stdlib_stats_moment module~stdlib_stats_moment->module~stdlib_optval module~stdlib_stats_moment->module~stdlib_error module~stdlib_strings_to_string stdlib_strings_to_string module~stdlib_strings_to_string->module~stdlib_strings module~stdlib_math_arange stdlib_math_arange module~stdlib_math_arange->module~stdlib_math module~stdlib_bitsets_large stdlib_bitsets_large module~stdlib_bitsets_large->module~stdlib_bitsets module~stdlib_sorting_sort_index stdlib_sorting_sort_index module~stdlib_sorting_sort_index->module~stdlib_sorting module~stdlib_sorting_sort stdlib_sorting_sort module~stdlib_sorting_sort->module~stdlib_sorting module~estop estop module~estop->module~stdlib_error module~stdlib_math_logspace stdlib_math_logspace module~stdlib_math_logspace->module~stdlib_math module~stdlib_quadrature_simps stdlib_quadrature_simps module~stdlib_quadrature_simps->module~stdlib_error module~stdlib_stats_distribution_uniform stdlib_stats_distribution_uniform module~stdlib_stats_distribution_uniform->module~stdlib_error module~stdlib_stats_distribution_uniform->module~stdlib_random module~estop~2 estop module~estop~2->module~stdlib_error module~stdlib_linalg_outer_product stdlib_linalg_outer_product module~stdlib_linalg_outer_product->module~stdlib_linalg module~stdlib_sorting_ord_sort stdlib_sorting_ord_sort module~stdlib_sorting_ord_sort->module~stdlib_sorting module~stdlib_math_linspace stdlib_math_linspace module~stdlib_math_linspace->module~stdlib_math module~stdlib_linalg_diag stdlib_linalg_diag module~stdlib_linalg_diag->module~stdlib_linalg module~stdlib_stringlist_type stdlib_stringlist_type module~stdlib_stringlist_type->module~stdlib_math module~stdlib_stringlist_type->module~stdlib_string_type module~stdlib_bitsets_64 stdlib_bitsets_64 module~stdlib_bitsets_64->module~stdlib_bitsets module~stdlib_quadrature_trapz stdlib_quadrature_trapz module~stdlib_quadrature_trapz->module~stdlib_error module~stdlib_string_type_constructor stdlib_string_type_constructor module~stdlib_string_type_constructor->module~stdlib_strings module~stdlib_string_type_constructor->module~stdlib_string_type

Contents


Interfaces

public interface optval

Fallback value for optional arguments (Specification)

  • private pure elemental function optval_rsp(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    real(kind=sp), intent(in), optional :: x
    real(kind=sp), intent(in) :: default

    Return Value real(kind=sp)

  • private pure elemental function optval_rdp(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(in), optional :: x
    real(kind=dp), intent(in) :: default

    Return Value real(kind=dp)

  • private pure elemental function optval_iint8(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int8), intent(in), optional :: x
    integer(kind=int8), intent(in) :: default

    Return Value integer(kind=int8)

  • private pure elemental function optval_iint16(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int16), intent(in), optional :: x
    integer(kind=int16), intent(in) :: default

    Return Value integer(kind=int16)

  • private pure elemental function optval_iint32(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int32), intent(in), optional :: x
    integer(kind=int32), intent(in) :: default

    Return Value integer(kind=int32)

  • private pure elemental function optval_iint64(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=int64), intent(in), optional :: x
    integer(kind=int64), intent(in) :: default

    Return Value integer(kind=int64)

  • private pure elemental function optval_csp(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=sp), intent(in), optional :: x
    complex(kind=sp), intent(in) :: default

    Return Value complex(kind=sp)

  • private pure elemental function optval_cdp(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(in), optional :: x
    complex(kind=dp), intent(in) :: default

    Return Value complex(kind=dp)

  • private pure elemental function optval_ll1(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    logical, intent(in), optional :: x
    logical, intent(in) :: default

    Return Value logical

  • private pure function optval_character(x, default) result(y)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in), optional :: x
    character(len=*), intent(in) :: default

    Return Value character(len=:), allocatable