integer_to_string Subroutine

private puresubroutine integer_to_string(ival, str)

Arguments

Type IntentOptional AttributesName
integer(kind=IK), intent(in) :: ival

integer value.

character(kind=CK,len=*), intent(out) :: str

ival converted to a string.

Description

Convert an integer to a string.

Called By

proc~~integer_to_string~~CalledByGraph proc~integer_to_string integer_to_string proc~push_char push_char proc~push_char->proc~integer_to_string proc~json_value_print json_value_print proc~json_value_print->proc~integer_to_string proc~json_value_print->proc~json_value_print proc~annotate_invalid_json annotate_invalid_json proc~annotate_invalid_json->proc~integer_to_string proc~parse_value parse_value proc~parse_value->proc~push_char proc~parse_number parse_number proc~parse_value->proc~parse_number proc~parse_object parse_object proc~parse_value->proc~parse_object proc~parse_array parse_array proc~parse_value->proc~parse_array proc~parse_number->proc~push_char proc~json_parse_string json_parse_string proc~json_parse_string->proc~annotate_invalid_json proc~json_parse_string->proc~parse_value proc~json_parse_file json_parse_file proc~json_parse_file->proc~annotate_invalid_json proc~json_parse_file->proc~parse_value proc~parse_object->proc~parse_value proc~parse_object->proc~parse_object proc~parse_array->proc~parse_value proc~wrap_json_parse_string wrap_json_parse_string proc~wrap_json_parse_string->proc~json_parse_string interface~json_parse json_parse interface~json_parse->proc~json_parse_string interface~json_parse->proc~json_parse_file proc~test_14 test_14 proc~test_14->interface~json_parse interface~json_print json_print proc~test_14->interface~json_print proc~test_8 test_8 proc~test_8->interface~json_parse proc~test_8->interface~json_print proc~json_file_load json_file_load proc~json_file_load->interface~json_parse proc~json_file_load_from_string json_file_load_from_string proc~json_file_load_from_string->interface~json_parse program~jf_test_14 jf_test_14 program~jf_test_14->proc~test_14 program~jf_test_8 jf_test_8 program~jf_test_8->proc~test_8 proc~wrap_json_file_load_from_string wrap_json_file_load_from_string proc~wrap_json_file_load_from_string->proc~json_file_load_from_string proc~json_value_to_string json_value_to_string proc~json_value_to_string->proc~json_value_print proc~json_file_print_1 json_file_print_1 proc~json_file_print_1->proc~json_value_print proc~json_print_1 json_print_1 proc~json_print_1->proc~json_value_print proc~json_file_print_to_console json_file_print_to_console proc~json_file_print_to_console->proc~json_value_print proc~json_file_print_to_string json_file_print_to_string proc~json_file_print_to_string->proc~json_value_to_string interface~json_print_to_string json_print_to_string interface~json_print_to_string->proc~json_value_to_string proc~test_4 test_4 proc~test_4->interface~json_print_to_string proc~test_4->interface~json_print program~jf_test_4 jf_test_4 program~jf_test_4->proc~test_4 interface~json_print->proc~json_print_1 proc~json_print_2 json_print_2 interface~json_print->proc~json_print_2 proc~test_7 test_7 proc~test_7->interface~json_print proc~test_2 test_2 proc~test_2->interface~json_print proc~test_12 test_12 proc~test_12->interface~json_print proc~json_print_2->interface~json_print program~jf_test_7 jf_test_7 program~jf_test_7->proc~test_7 program~jf_test_2 jf_test_2 program~jf_test_2->proc~test_2 program~jf_test_12 jf_test_12 program~jf_test_12->proc~test_12
Help

Variables

TypeVisibility AttributesNameInitial
integer(kind=IK), public :: istat

Source Code

    pure subroutine integer_to_string(ival,str)

    implicit none

    integer(IK),intent(in)               :: ival  !! integer value.
    character(kind=CK,len=*),intent(out) :: str   !! ival converted to a string.

    integer(IK) :: istat

    write(str,fmt=int_fmt,iostat=istat) ival

    if (istat==0) then
        str = adjustl(str)
    else
        str = repeat(star,len(str))
    end if

    end subroutine integer_to_string