The CHAR function returns a character from a specified character set.
SyntaxCHAR (i [, kind] )
i is an INTENT(IN) scalar or array of type INTEGER. Each i value must be positive and not greater than the number of characters in the collating sequence of the character set specified by kind
kind is INTENT(IN) and determines which character set is chosen. It must be a scalar INTEGER expression that can be evaluated at compile time. Only the ASCII character set is supported, with a kind number of 1. See ASCII Character Set
The result is a CHARACTER value of length one corresponding to the ith character of the given character set.
If kind is present, the resulting kind is specified by kind. Only the default kind is supported.
If kind is absent, the kind is of type default CHARACTER.
Exampleinteger,dimension(6) :: i=(/72,111,119,100,121,33/) write(*,*) char(i) ! writes "Howdy!"