FNLStat : Utilities : IACHAR
IACHAR
This function returns the integer ASCII value of a character argument.
Function Return Value
IACHAR β€” Integer ASCII value for CH. (Output)
The character CH is in the IACHAR‑th position of the ASCII collating sequence.
Required Arguments
CH β€” Character argument for which the integer ASCII value is desired. (Input)
FORTRAN 90 Interface
Generic: IACHAR (CH)
Specific: The specific interface name is IACHAR.
FORTRAN 77 Interface
Single: IACHAR (CH)
Description
Routine IACHAR returns the ASCII value of the input character.
Example
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
Output
 
For the character A the ASCII value is : 65
Published date: 03/19/2020
Last modified date: 03/19/2020