Next: , Previous: CEILING, Up: Intrinsic Procedures


8.28 CHAR — Character conversion function

Description:
CHAR(I,[KIND]) returns the character represented by the integer I.
Option:
f95, gnu
Class:
elemental function
Syntax:
C = CHAR(I[,KIND])
Arguments:

I The type shall be INTEGER(*).
KIND Optional scaler integer initialization expression.

Return value:
The return value is of type CHARACTER(1)
Example:
          program test_char
              integer :: i = 74
              character(1) :: c
              c = char(i)
              print *, i, c ! returns 'J'
          end program test_char