LF Fortran 95

ACHAR Function

Description

The ACHAR function returns a character from the ASCII collating sequence.

Syntax

ACHAR (i)

Arguments

i is an INTENT(IN) scalar or array of type INTEGER.

Result

A length one CHARACTER value corresponding to the character in position (i) of the ASCII collating sequence.

If i is an array, the result is an array of length one CHARACTER values, with the same shape as i

Example

       integer, dimension(6) :: i=(/72,111,119,100,121,33/)
       write(*,*) achar(i)  ! writes "Howdy!"
            

See Also

ASCII Character Set