From: "Y.Tomino" <demoonlit@panathenaia.halfmoon.jp>
Subject: Unicode identifier and Wide_Value
Date: Fri, 14 Jul 2006 02:46:39 +0900
Date: 2006-07-14T02:46:39+09:00 [thread overview]
Message-ID: <e960tm$56c$2@news521.nifty.com> (raw)
Hello.
Ada2005 supports Unicode Identifier, and I tried to use it.
It's convenience to convert enum-values <=> strings.
Wide_Image works, but Wide_Value(Wide_Image(x)) raises Constraint_Error.
Test:
with Ada.Text_IO;
procedure Test is
type T is (あ); -- Japanease letter like A
I : Wide_String := T'Wide_Image(T'First);
S : T := T'Wide_Value(I);
begin
null;
end Test;
>gnatmake -gnat05 -gnatW8 test
gcc -c -gnat05 -gnatW8 test.adb
gnatbind -x test.ali
gnatlink test.ali
>test
raised CONSTRAINT_ERROR : s-valenu.adb:75 explicit raise
But bracket literal ["3042"] works correctly. Wide_Image and Wide_Value
are OK........
???
--
YT
next reply other threads:[~2006-07-13 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 17:46 Y.Tomino [this message]
2006-07-14 3:17 ` Unicode identifier and Wide_Value Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox