ICHAR(C, KIND)

Purpose

Returns the position of a character in the collating sequence associated with the kind type parameter of the character.

Class

Elemental function

Argument type and attributes

C
An INTENT(IN) CHARACTER of length one. Its value must be that of a representable character.
Fortran 2003 begins KIND (optional)
An INTENT(IN) INTEGER scalar. The actual argument corresponding to KIND must be a constant expression.Fortran 2003 ends

Result type and attributes

Result value

Examples

IBM extension begins ICHAR ('X') has the value 88 in the ASCII collating sequence.
Specific Name Argument Type Result Type Pass As Arg?
ICHAR default character default integer yes  1 
Note:
  •  1  IBM extension: the ability to pass the name as an argument.
  •  2  XL Fortran supports only the ASCII collating sequence.
IBM extension ends