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

Description

Routine IACHAR returns the ASCII value of the input character.

Single:                                IACHAR (CH)

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


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260