This function returns a character given its ASCII value.
ACHAR — CHARACTER * 1 string containing the character in the I-th position of the ASCII collating sequence. (Output)
I — Integer ASCII
value of the character desired. (Input)
I must be greater than
or equal to zero and less than or equal to 127.
Generic: ACHAR (I)
Specific: The specific interface name is ACHAR.
Single: ACHAR (I)
Routine ACHAR returns the character of the input ASCII value. The input value should be between 0 and 127. If the input value is out of range, the value returned in ACHAR is machine dependent.
This example returns the character of the ASCII value 65.
USE ACHAR_INT
USE UMACH_INT
! IMPLICIT NONE
INTEGER I, NOUT
!
CALL UMACH (2, NOUT)
! Get character for ASCII value
! of 65 ('A')
I = 65
WRITE (NOUT,99999) I, ACHAR(I)
!
99999 FORMAT (' For the ASCII value of ', I2, ', the character is : ', &
A1)
END
For the ASCII value of 65, the character is : A
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |