Commit 9a18b99b by Tobias Burnus Committed by Tobias Burnus

re PR fortran/45295 (intrinsic.texi: SELECTED_CHAR_KIND should mention wide-char support)

2010-08-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45295
        * intrinsic.texi (selected_char_kind): Document ISO_10646
        support.

From-SVN: r163347
parent c043ee4a
2010-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/45295
* intrinsic.texi (selected_char_kind): Document ISO_10646
support.
2010-08-17 Jakub Jelinek <jakub@redhat.com> 2010-08-17 Jakub Jelinek <jakub@redhat.com>
PR fortran/45304 PR fortran/45304
......
...@@ -9677,7 +9677,8 @@ seconds. ...@@ -9677,7 +9677,8 @@ seconds.
@code{SELECTED_CHAR_KIND(NAME)} returns the kind value for the character @code{SELECTED_CHAR_KIND(NAME)} returns the kind value for the character
set named @var{NAME}, if a character set with such a name is supported, set named @var{NAME}, if a character set with such a name is supported,
or @math{-1} otherwise. Currently, supported character sets include or @math{-1} otherwise. Currently, supported character sets include
``ASCII'' and ``DEFAULT'', which are equivalent. ``ASCII'' and ``DEFAULT'', which are equivalent, and ``ISO_10646''
(Universal Character Set, UCS-4) which is commonly known as Unicode.
@item @emph{Standard}: @item @emph{Standard}:
Fortran 2003 and later Fortran 2003 and later
...@@ -9695,13 +9696,25 @@ Transformational function ...@@ -9695,13 +9696,25 @@ Transformational function
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
program ascii_kind program character_kind
integer,parameter :: ascii = selected_char_kind("ascii") use iso_fortran_env
character(kind=ascii, len=26) :: s implicit none
integer, parameter :: ascii = selected_char_kind ("ascii")
integer, parameter :: ucs4 = selected_char_kind ('ISO_10646')
character(kind=ascii, len=26) :: alphabet
character(kind=ucs4, len=30) :: hello_world
alphabet = ascii_"abcdefghijklmnopqrstuvwxyz"
hello_world = ucs4_'Hello World and Ni Hao -- ' &
// char (int (z'4F60'), ucs4) &
// char (int (z'597D'), ucs4)
write (*,*) alphabet
s = ascii_"abcdefghijklmnopqrstuvwxyz" open (output_unit, encoding='UTF-8')
print *, s write (*,*) trim (hello_world)
end program ascii_kind end program character_kind
@end smallexample @end smallexample
@end table @end table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment