get_option_with_default_real64 Function

private elemental function get_option_with_default_real64(option, default) result(option_out)

Returns option if present or default if not.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), optional :: option
real(kind=real64), intent(in) :: default

Return Value real(kind=real64)


Contents


Source Code

  elemental function get_option_with_default_real64(option, default) result(option_out)
    implicit none
    real(kind=real64), intent(in), optional :: option
    real(kind=real64), intent(in) :: default
    real(kind=real64) :: option_out

    if( present(option) ) then
       option_out = option
    else
       option_out = default
    end if
  end function get_option_with_default_real64