isprint(3f) - [M_strings:COMPARE] returns .true. if character is an ASCII printable character (LICENSE:PD)
Synopsis
Description
Options
Returns
Examples
Author
License
elemental function isprint(onechar)
character,intent(in) :: onechar logical :: isprint
isprint(3f) returns .true. if character is an ASCII printable character
onechar character to test
isprint logical value returns true if character is a printable ASCII character else false.
Sample Program:
program demo_isprint use M_strings, only : isprint implicit none integer :: i character(len=1),parameter :: string(*)=[(char(i),i=0,127)] write(*,(40(a)))ISPRINT: ,pack( string, isprint(string) ) end program demo_isprintResults:
ISPRINT: !"#$%&()*+,-./0123456789:;<=>?@ABCDEF GHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmn opqrstuvwxyz{|}~
John S. Urban
Public Domain
Nemo Release 3.1 | isprint (3m_strings) | January 10, 2025 |