char_to_int64 Function

private pure function char_to_int64(str, kind) result(i)

Basic string to integer(ip) routine. Hacky hack just so we can overload as int()

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str
integer, intent(in) :: kind

Return Value integer(kind=ip)


Called by

proc~~char_to_int64~~CalledByGraph proc~char_to_int64 char_to_int64 interface~int int interface~int->proc~char_to_int64

Source Code

    pure function char_to_int64(str, kind) result(i)
        character(len=*),intent(in) :: str
        integer,intent(in) :: kind
        integer(ip) :: i
        integer :: istat
        if (kind/=ip) error stop 'error'
        read(str,*, iostat=istat) i
        if (istat/=0) then
            error stop str
        end if
    end function char_to_int64