Clicky
Showing changes from revision #1 to #2:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
char(i [, kind])
returns the character represented by the integer i
.
(削除) Fortran 77 and later (削除ここまで)(追記) FORTRAN 77 (追記ここまで)(追記) and later (追記ここまで)
(削除) Elemental function (削除ここまで)(追記) Elemental function (追記ここまで)
result = char(i [, kind])
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)
program test_char
integer :: i = 74
character(1) :: c
c = char(i)
print *, i, c ! returns 'J'
end program test_char
See ichar for a discussion of converting between numerical values and formatted string representations.