Clicky

Fortran Wiki
char (Rev #1, changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #0 to #1: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

char(i [, kind]) returns the character represented by the integer i.

Standard

Fortran 77 and later

Class

Elemental function

Syntax

result = char(i [, kind])

Arguments

  • i - The type shall be integer.
  • kind - (Optional) An integer initialization expression indicating the kind parameter of the result.

Return value

The return value is of type character(1)

Example

program test_char
 integer :: i = 74
 character(1) :: c
 c = char(i)
 print *, i, c ! returns 'J'
end program test_char

Note

See ichar for a discussion of converting between numerical values and formatted string representations.

See also

achar, iachar, ichar

category: Intrinsics

Revision from April 24, 2009 15:57:19 by Jason Blevins
Forward in time (to current) | See current | History | Rollback | View: Source | Linked from: Intrinsic procedures, achar, iachar, ichar

AltStyle によって変換されたページ (->オリジナル) /