ICHAR

Elemental Intrinsic Function (Generic): Returns the position of a character in the processor's character set.

Syntax

result = ICHAR (c)

c
(Input) Must be of type character of length 1.

Results:

The result is of type default integer. The result value is the position of c in the processor's character set. c is in the range zero to n - 1, where n is the number of characters in the character set.

For any characters C and D (capable of representation in the processor), C .LE. D is true only if ICHAR(C) .LE. ICHAR(D) is true, and C .EQ. D is true only if ICHAR(C) .EQ. ICHAR(D) is true.

Specific Name Argument Type Result Type
  CHARACTER  INTEGER(2) 
ICHAR 1  CHARACTER  INTEGER(4) 
 CHARACTER  INTEGER(8)
1 This specific function cannot be passed as an actual argument.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: IACHAR, CHAR, ASCII and Key Code Charts

Examples

ICHAR ( 'W' ) has the value 87.

ICHAR ( '#' ) has the value 35.