IACHAR — Code in ASCII collating sequence¶
- IACHAR(C)¶
IACHAR(C)returns the code for the ASCII character in the first character position ofC.- Parameters
C – Shall be a scalar
CHARACTER, withINTENT(IN)KIND – (Optional) An
INTEGERinitialization expression indicating the kind parameter of the result.
- Returns
The return value is of type
INTEGERand of kindKIND. IfKINDis absent, the return value is of default integer kind.
Standard:Fortran 95 and later, with
KINDargument Fortran 2003 and laterClass:Elemental function
Syntax:RESULT = IACHAR(C [, KIND])
Example:program test_iachar integer i i = iachar(' ') end program test_iachar
Note:See ICHAR for a discussion of converting between numerical values and formatted string representations.
See also:ACHAR, CHAR, ICHAR