FNLStat : Utilities : ICASE
ICASE
This function returns the ASCII value of a character converted to uppercase.
Function Return Value
ICASE — Integer ASCII value for CH without regard to the case of CH. (Output)
Routine ICASE returns the same value as IACHAR for all but lowercase letters. For these, it returns the IACHAR value for the corresponding uppercase letter.
Required Arguments
CH — Character to be converted. (Input)
FORTRAN 90 Interface
Generic: ICASE (CH)
Specific: The specific interface name is ICASE.
FORTRAN 77 Interface
Single: ICASE (CH)
Description
Routine ICASE converts a character to its integer ASCII value. The conversion is case insensitive; that is, it returns the ASCII value of the corresponding uppercase letter for a lowercase letter.
Example
This example shows the case insensitive conversion.
 
USE ICASE_INT
USE UMACH_INT
 
IMPLICIT NONE
INTEGER NOUT
CHARACTER CHR
! Get output unit number
CALL UMACH (2, NOUT)
! Get ASCII value for the character
! 'a'.
CHR = 'a'
WRITE (NOUT,99999) CHR, ICASE(CHR)
!
99999 FORMAT (' For the character ', A1, ' the ICASE value is : ', &
I3)
END
Output
For the character a the ICASE value is : 65
Published date: 03/19/2020
Last modified date: 03/19/2020