Skip to content

Commit a68430a

Browse files
Update src/stdlib_ascii.f90
Co-authored-by: Ian Giestas Pauli <iangiestaspauli@gmail.com>
1 parent 37f1d6c commit a68430a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stdlib_ascii.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ pure logical function is_graphical(c)
144144
pure logical function is_printable(c)
145145
character(len=1), intent(in) :: c !! The character to test.
146146
integer :: ic
147-
ic = iachar(c) ! '~'
147+
ic = iachar(c)
148+
!The character is printable if it's between ' ' and '~' in the ASCII table
148149
is_printable = ic >= iachar(' ') .and. ic <= int(z'7E')
149150
end function
150151

0 commit comments

Comments
 (0)