This function returns the ASCII value of a character converted to uppercase.
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.
CH — Character to be converted. (Input)
Generic: ICASE (CH)
Specific: The specific interface name is ICASE.
Single: ICASE (CH)
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.
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
For the character a the ICASE value is : 65
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |