num_digits Function

public pure function num_digits(i)

return the number of digits in the integer

Arguments

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

Return Value integer


Calls

proc~~num_digits~~CallsGraph proc~num_digits num_digits float float proc~num_digits->float

Source Code

    pure integer function num_digits(i)
        !! return the number of digits in the integer
        integer(ip),intent(in) :: i
        num_digits = 1_ip+int(log10(float(i)), ip)
    end function num_digits