Returns the position of a character
in the ASCII collating sequence.
Class
Elemental function
Argument type and attributes
C
An INTENT(IN) character of length one.
KIND (optional)
An INTENT(IN)INTEGER scalar.
The actual argument corresponding to KIND must
be a constant expression.
Result type and attributes
It is of type integer.
If KIND is present,
the KIND type parameter is that specified
by the value of KIND; otherwise, the KIND type
parameter is that of default integer type.
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.