is_white Function

public elemental function is_white(c)

Checks whether or not c is a whitespace character. That includes the space, tab, vertical tab, form feed, carriage return, and linefeed characters.

Arguments

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

The character to test.

Return Value logical


Variables

Type Visibility Attributes Name Initial
integer, private :: ic

Source Code

   elemental logical function is_white(c)
      character(len=1), intent(in) :: c
          !! The character to test.
      integer :: ic
      ic = iachar(c)             ! TAB, LF, VT, FF, CR
      is_white = (c == ' ') .or. (ic >= int(z'09') .and. ic <= int(z'0D'))
   end function is_white