The ICHAR function returns the position of a character in the collating sequence associated with the kind of the character. The only character set supported is the ASCII character set, with a kind number of 1, containing 127 characters.
c is an INTENT(IN) scalar or array of type CHARACTER with a length of one.
The result is of type default INTEGER. Its value is the position of c in
the collating sequence associated with the kind of c and is in the range
Examplecharacter(len=1) :: c(6)=(/"H","o","w","d","y","!"/) write(*,*) ichar(c) ! writes 72 111 119 100 121 33