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
INTEGER
initialization expression indicating the kind parameter of the result.
- Returns:
The return value is of type
INTEGER
and of kindKIND
. IfKIND
is absent, the return value is of default integer kind.
- Standard:
Fortran 95 and later, with
KIND
argument Fortran 2003 and later- Class:
Elemental function
- Syntax:
RESULT = IACHAR(C [, KIND])
- Example:
program test_iachar integer i i = iachar(' ') end program test_iachar
- Note:
See ICHAR — Character-to-integer conversion function for a discussion of converting between numerical values and formatted string representations.
- See also:
ACHAR — Character in ASCII collating sequence, CHAR — Character conversion function, ICHAR — Character-to-integer conversion function