CVS difference for ai05s/ai05-0182-1.txt
--- ai05s/ai05-0182-1.txt 2010/08/06 03:52:09 1.2
+++ ai05s/ai05-0182-1.txt 2011/02/08 08:21:06 1.3
@@ -224,6 +224,45 @@
****************************************************************
+From: Robert Dewar
+Sent: Sunday, July 25, 2010 2:41 PM
+
+For the record, the following program with GNAT:
+
+with Text_IO; use Text_IO;
+procedure ValueTest is
+ A : Character;
+ B : Character;
+begin
+ begin
+ A := Character'Value
+ ("'" & Character'Val (16) & "'");
+ Put_Line (Integer'Image (Character'Pos (A)));
+ exception
+ when Constraint_Error =>
+ Put_Line ("Case 1 CE raised");
+ end;
+
+ begin
+ B := Character'Value ("HEX_00000041");
+ Put_Line (Integer'Image (Character'Pos (B)));
+ exception
+ when Constraint_Error =>
+ Put_Line ("Case 2 CE raised");
+ end;
+end;
+
+outputs
+
+ 16
+Case 2 CE raised
+
+So it is not the case that GNAT permits the second form, so this claim
+should be corrected in the writeup. I don't know where anyone got this
+idea. Character'Value has never accepted strings of this form!
+
+****************************************************************
+
From: Randy Brukardt
Sent: Thursday, August 5, 2010 10:45 PM
Questions? Ask the ACAA Technical Agent