int_to_str Function

public pure function int_to_str(i) result(s)

integer to string

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: i

Return Value character(len=:), allocatable


Source Code

    pure function int_to_str(i) result(s)
    !! integer to string
        character(len=:),allocatable :: s
        integer(ip),intent(in) :: i
        character(len=256) :: s_tmp
        write(s_tmp, '(I256)') i
        s = trim(adjustl(s_tmp))
    end function int_to_str