C Library Functions  - ispunct (3)

NAME

ispunct(3f) - [M_strings:COMPARE] returns .true. if character is a printable punctuation character (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Example
Author
License

SYNOPSIS

elemental function ispunct(onechar)

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

DESCRIPTION

ispunct(3f) returns .true. if character is a printable punctuation character

OPTIONS

onechar
  character to test

RETURNS

ispunct
  logical value returns true if character is a printable punctuation character.

EXAMPLE

Sample program:

    program demo_ispunct
    use M_strings, only : ispunct
    implicit none
    integer                    :: i
    character(len=1),parameter :: string(*)=[(char(i),i=0,127)]
       write(*,’(20(g0,1x))’)’ISPUNCT: ’, &
       & iachar(pack( string, ispunct(string) ))
       write(*,’(20(g0,1x))’)’ISPUNCT: ’, &
       & pack( string, ispunct(string) )
    end program demo_ispunct
Results:

   ISPUNCT:  33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 58 59 60 61
   62 63 64 91 92 93 94 95 96 123 124 125 126
   ISPUNCT:  ! " # $ % & ’ ( ) * + , - . / : ; < =
   > ? @ [ \ ] ^ _ ‘ { | } ~

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 ispunct (3) July 22, 2023
Generated by manServer 1.08 from 67790195-38aa-43ac-9d14-6b5cccc46502 using man macros.