This function returns the integer ASCII value of a character argument.
IACHAR — Integer
ASCII value for CH.
(Output)
The character CH is in the IACHAR-th position of
the ASCII collating sequence.
CH — Character argument for which the integer ASCII value is desired. (Input)
Generic: IACHAR (CH)
Specific: The specific interface name is IACHAR.
Routine IACHAR returns the ASCII value of the input character.
Single: IACHAR (CH)
This example gives the ASCII value of character A.
USE IACHAR_INT
IMPLICIT NONE
INTEGER NOUT
CHARACTER CH
!
CALL UMACH (2, NOUT)
! Get ASCII value for the character
! 'A'.
CH = 'A'
WRITE (NOUT,99999) CH, IACHAR(CH)
!
99999 FORMAT (' For the character ', A1, ' the ASCII value is : ', &
I3)
END
For the character A the ASCII value is : 65
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |