islower Function

public elemental function islower(ch) result(res)

NAME

 islower(3f) - [M_strings:COMPARE] returns .true. if character is a
 miniscule letter (a-z)
 (LICENSE:PD)

SYNOPSIS

elemental function islower(onechar)

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

DESCRIPTION

 islower(3f) returns .true. if character is a miniscule letter (a-z)

OPTIONS

onechar  character to test

RETURNS

islower  logical value returns true if character is a lowercase
         ASCII character else false.

EXAMPLE

Sample program

 program demo_islower
 use M_strings, only : islower
 implicit none
 integer                    :: i
 character(len=1),parameter :: string(*)=[(char(i),i=0,127)]
    write(*,'(15(g0,1x))')'ISLOWER: ', &
    & iachar(pack( string, islower(string) ))
    write(*,'(15(g0,1x))')'ISLOWER: ', &
    & pack( string, islower(string) )
 end program demo_islower

Results:

ISLOWER:  97 98 99 100 101 102 103 104 105 106 107 108 109 110
111 112 113 114 115 116 117 118 119 120 121 122
ISLOWER:  a b c d e f g h i j k l m n
o p q r s t u v w x y z

AUTHOR

 John S. Urban

LICENSE

 Public Domain

Arguments

Type IntentOptional Attributes Name
character, intent(in) :: ch

Return Value logical


Contents

Source Code


Source Code

elemental function islower(ch) result(res)

! ident_77="@(#) M_strings islower(3f) returns true if character is a miniscule letter (a-z)"

character,intent(in) :: ch
logical              :: res
   select case(ch)
   case('a':'z'); res=.true.
   case default;  res=.false.
   end select
end function islower