is_punctuation Function

public elemental function is_punctuation(c)

Checks whether or not c is a punctuation character. That includes all ASCII characters which are not control characters, letters, digits, or whitespace.

Arguments

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

The character to test.

Return Value logical


Calls

proc~~is_punctuation~~CallsGraph proc~is_punctuation is_punctuation proc~is_alphanum is_alphanum proc~is_punctuation->proc~is_alphanum

Variables

Type Visibility Attributes Name Initial
integer, private :: ic

Source Code

   elemental logical function is_punctuation(c)
      character(len=1), intent(in) :: c
          !! The character to test.
      integer :: ic
      ic = iachar(c)    !       '~'                 '!'
      is_punctuation = (ic <= int(z'7E')) .and. (ic >= int(z'21')) .and. &
                       (.not. is_alphanum(c))
   end function is_punctuation