9.3.24 CHAR (I [, KIND])

Description:  Returns the character in the specified position of the processor's character set. It is the inverse of the function ICHAR.  
Class:  Elemental function; Generic 
Arguments:  I Must be of type integer with a value in the range 0 to n - 1, where n is the number of characters in the processor's character set. 
  KIND (opt) Must be a scalar integer initialization expression. 
Results:  The result type is character with length 1. The kind parameter is that of default character type.

The result is the character in position I of the processor's character set. ICHAR(CHAR (I, KIND(C))) has the value I for 0 to n - 1 and CHAR(ICHAR(C), KIND(C)) has the value C for any character C capable of representation in the processor. 

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

Examples

CHAR (76) has the value 'L'.

CHAR (94) has the value '^'.


Previous Page Next Page Table of Contents