is_hex_digit Function

public elemental function is_hex_digit(c)

Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f).

Arguments

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

The character to test.

Return Value logical


Source Code

   elemental logical function is_hex_digit(c)
      character(len=1), intent(in) :: c
          !! The character to test.
      is_hex_digit = (c >= '0' .and. c <= '9') .or. (c >= 'a' .and. c <= 'f') &
                     .or. (c >= 'A' .and. c <= 'F')
   end function is_hex_digit