Checks whether or not c is a punctuation character. That includes
all ASCII characters which are not control characters, letters,
digits, or whitespace.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(in) | :: | c |
The character to test. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | ic |
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