Manual Reference Pages  - isblank (3m_strings)

NAME

isblank(3f) - [M_strings:COMPARE] returns .true. if character is a blank character (space or horizontal tab). (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Examples
Author
License

SYNOPSIS

elemental function isblank(onechar)

    character(len=*),intent(in) :: onechar
    logical              :: isblank

DESCRIPTION

isblank(3f) returns .true. if character is a blank character (space or horizontal tab).

OPTIONS

onechar
  character to test

RETURNS

isblank
  Returns true logical value if character is a "blank"
( an ASCII
  space or horizontal tab character). If a multi-byte string was input .false. is returned if any character is not blank. A null string returns .false.

EXAMPLES

Sample program:

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

Results:

   ISBLANK:  9 32

AUTHOR

John S. Urban

LICENSE

Public Domain