char(x, [, kind]): Integer to Character¶
Integer to character conversion.
Declaration¶
Sintaxe¶
retval = char(x)
character function char(x)
Argumentos¶
x
: the input value of integer type.
kind
: an optional input value of type integer constant expression for
initialization. This indicates the kind parameter of the result.
Valor de retorno¶
The return value is of type character of length 1.
The return value is of kind kind
if optional input value is passed, otherwise
the kind is default kind.
Descrição¶
char(x) returns the character represented by the ASCII character set
at x
position.
If x
is outside the ASCII character set integer value, i.e., if x
is not
represented in the ASCII character set, the return value is undefined.
It is a runtime builtin function.
Tipos¶
Supported argument type is integer.
interface
character function char(x)
integer, intent(in) :: x
end function
end interface
Exemplos¶
program intrinsics_char
implicit none
character :: L = char(76)
print *, L
end program
Resultado:
L
Veja Também¶
achar, iachar, ichar