return the number of digits in the integer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in) | :: | i |
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