is_digit Function

public elemental function is_digit(c)

Checks whether c is a digit (0 .. 9).

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: c

The character to test.

Return Value logical


Source Code

   elemental logical function is_digit(c)
      character(len=1), intent(in) :: c
          !! The character to test.
      is_digit = ('0' <= c) .and. (c <= '9')
   end function is_digit