char(3f) - [FORTRAN:INTRINSIC:CHARACTER] Character conversion function
result = char(i [, kind])
char(i [, kind]) returns the character represented by the integer I.
I The type shall be INTEGER. KIND (Optional) An INTEGER initialization expression indicating the kind parameter of the result.
The return value is of type character(1)
Sample program:
program demo_char implicit none integer :: i = 74 character(1) :: c c = char(i) print *, i, c ! returns J end program demo_char
See [[ichar]] for a discussion of converting between numerical values and formatted string representations.
[[FORTRAN 77]] and later
[[Elemental procedure|Elemental function]]
[[achar]], [[iachar]], [[ichar]]Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental: adjustl(3), adjustr(3), index(3), len_trim(3), scan(3), verify(3) Nonelemental: repeat(3), trim(3)
char (3) | March 11, 2021 |