optional_int_to_string Subroutine

private subroutine optional_int_to_string(int_value, string_value, default_value)

Integer to string, specifying the default value if the optional argument is not present.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: int_value

integer value

character(len=*), intent(out) :: string_value

integer value stringified

character(len=*), intent(in) :: default_value

default integer value


Calls

proc~~optional_int_to_string~~CallsGraph proc~optional_int_to_string optional_int_to_string proc~integer_to_string integer_to_string proc~optional_int_to_string->proc~integer_to_string

Called by

proc~~optional_int_to_string~~CalledByGraph proc~optional_int_to_string optional_int_to_string proc~add_3d_plot pyplot%add_3d_plot proc~add_3d_plot->proc~optional_int_to_string proc~add_contour pyplot%add_contour proc~add_contour->proc~optional_int_to_string proc~add_errorbar pyplot%add_errorbar proc~add_errorbar->proc~optional_int_to_string proc~add_hist pyplot%add_hist proc~add_hist->proc~optional_int_to_string proc~add_plot pyplot%add_plot proc~add_plot->proc~optional_int_to_string proc~add_sphere pyplot%add_sphere proc~add_sphere->proc~optional_int_to_string proc~initialize pyplot%initialize proc~initialize->proc~optional_int_to_string proc~plot_surface pyplot%plot_surface proc~plot_surface->proc~optional_int_to_string proc~plot_wireframe pyplot%plot_wireframe proc~plot_wireframe->proc~optional_int_to_string

Source Code

    subroutine optional_int_to_string(int_value, string_value, default_value)

    integer,          intent(in), optional :: int_value      !! integer value
    character(len=*), intent(out)          :: string_value   !! integer value stringified
    character(len=*), intent(in)           :: default_value  !! default integer value

    if (present(int_value)) then
        call integer_to_string(int_value, string_value)
    else
        string_value = default_value
    end if

    end subroutine optional_int_to_string