char(3f) - [FORTRAN:INTRINSIC:CHARACTER] Character conversion function
Syntax
Description
Return Value
Example
Note
Standard
Class
See Also
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 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, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY; Nonelemental: REPEAT, TRIM
char (3) | March 18, 2019 |