The IACHAR function returns the position of a character in the ASCII collating sequence.
c is an INTENT(IN) scalar or array of type CHARACTER. c must have a length of one.
The result is of type default INTEGER. Its value is the position of c in
the ASCII collating sequence. It is in the range
If c is an array, the result is an array of integer values with the same shape as c.
Examplecharacter(len=1) :: c1='A',c3(3)=(/"a","b","c"/) write(*,*) iachar(c1) ! writes 65 write(*,*) iachar(c3) ! writes 97 98 99