Returns the character in the given position of the collating sequence associated
with the specified kind type parameter. It is the inverse of the function ICHAR.
Class
Elemental function
Argument type and attributes
I
must be of type integer with a value in the range
0 <= I <= 127.
KIND (optional)
must be a scalar integer initialization expression.
Result type and attributes
Character of length one.
If KIND is present, the kind type parameter is that specified
by KIND; otherwise, the kind type parameter is that of the default
character type.
Result value
The result is the character in position I of the collating sequence
associated with the specified kind type parameter.
ICHAR (CHAR (I, KIND (C))) must have the value I for 0 <= I <= 127 and CHAR (ICHAR (C), KIND (C)) must have the value C for any representable character.
Examples
CHAR (88) has the value 'X'.
Specific Name
Argument Type
Result Type
Pass As Arg?
CHAR
any integer
default character
yes 1
Notes:
IBM Extension: the ability to specify a nondefault integer argument.
XL Fortran supports only the ASCII collating sequence.