[UP]


Manual Reference Pages  - iscntrl (3)

NAME

iscntrl(3f) - [M_strings:COMPARE] returns .true. if character is a delete character or ordinary control character (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Example
Author
License

SYNOPSIS

elemental function iscntrl(onechar)

    character,intent(in) :: onechar
    logical              :: iscntrl

DESCRIPTION

iscntrl(3f) returns .true. if character is a delete character or ordinary control character

OPTIONS

onechar
  character to test

RETURNS

iscntrl
  logical value returns true if character is a control character

EXAMPLE

Sample program

    program demo_iscntrl
    use M_strings, only : iscntrl
    implicit none
    integer                    :: i
    character(len=1),parameter :: string(*)=[(char(i),i=0,127)]
       write(*,’(20(g0,1x))’)’ISCNTRL: ’, &
       & ichar(pack( string, iscntrl(string) ))
    end program demo_iscntrl

Results:

   ISCNTRL:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   20 21 22 23 24 25 26 27 28 29 30 31 127

AUTHOR

John S. Urban

LICENSE

Public Domain


iscntrl (3) March 11, 2021
Generated by manServer 1.08 from 4a5e3d83-360e-427e-9b53-e297ec3a1090 using man macros.