Purpose
Returns the position of a character in the ASCII collating sequence.
Class
Elemental function
Argument Type and Attributes
- C
- must be of type default character and of length one.
Result Type and Attributes
Default integer.
Result Value
- If C is in the collating sequence defined by the codes specified in ISO
646:1983 (International Reference Version), the result is the position
of C in that sequence and satisfies the inequality (0 <= IACHAR
(C) <= 127). An undefined value is returned if C is not in
the ASCII collating sequence.
- The results are consistent with the LGE, LGT, LLE, and LLT lexical
comparison functions. For example, LLE (C, D) is true, so IACHAR (C)
.LE. IACHAR (D) is true too.
Examples
IACHAR ('X') has the value 88.
