[UP]


Manual Reference Pages  - 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: ’, &
       & ichar(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


ispunct (3) March 11, 2021
Generated by manServer 1.08 from 6f061e32-e493-4b05-aef6-ec2c386aa640 using man macros.