CVS difference for ais/ai-00132.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00132.txt

--- ais/ai-00132.txt	1998/09/30 23:25:12	1.2
+++ ais/ai-00132.txt	1999/07/29 00:51:02	1.3
@@ -1,5 +1,6 @@
-!standard A.13     (13)                               98-06-12  AI95-00132/03
+!standard A.13     (13)                               99-07-28  AI95-00132/04
 !class binding interpretation 96-09-05
+!status Corrigendum 2000 99-07-28
 !status WG9 approved 98-06-12
 !status ARG Approved  11-0-1  97-11-14
 !status ARG Approved (subject to letter ballot) 10-0-1  96-10-07
@@ -9,12 +10,12 @@
 !difficulty Hard
 !subject Exception Raised at End of Stream
 
-!summary 96-11-16
+!summary
 
 If the default version of T'Read (for some type T) is used to read from
 a stream, then if end of stream is encountered, End_Error is raised.
 
-!question 96-11-16
+!question
 
 Suppose one gets a stream from the Ada.Text_IO.Streams.Stream function.
 (The same question applies to the Wide_Text_IO version, and also to
@@ -24,14 +25,16 @@
 one tries to get an item using the default version of T'Read, for some
 type T?  Is Data_Error or End_Error raised?  Can the result be abnormal?
 
-!recommendation 96-09-05
+!recommendation
 
 (See summary.)
 
-!wording 96-09-05
+!wording
 
-!discussion 96-11-16
+(See corrigendum.)
 
+!discussion
+
 13.13.1(8) admits to the notion of "end of stream" for stream types:
 
    The Read operation transfers Item'Length stream elements from the
@@ -125,8 +128,31 @@
     if not End_Of_File(An_Input_File) then
         T'Read(Stream(An_Input_File), Value);
         ...
+
+!corrigendum 13.13.2(35)
+
+@dinsa
+In the default implementation of Read and Input for a composite type,
+for each scalar component that is a discriminant or whose
+@fa<component_declaration> includes a @fa<default_expression>, a check is
+made that the value
+returned by Read for the component belongs to its subtype.  Constraint_Error
+is raised if this check fails. For other scalar components, no check is
+made.  For each component that is of an access type, if the implementation
+can detect that the value returned by Read for the component is not a value
+of its subtype, Constraint_Error is raised. If the value is not a value of
+its subtype and this error is not detected, the component has an abnormal
+value, and erroneous execution can result (see 13.9.1).
+@dinst
+In the default implementation of Read and Input for a type, End_Error
+is raised if the end of the stream is reached before completing
+to read a value of the type.
+
+!ACATS test
+
+Create a C-Test to test this using Ada.Text_IO.Streams.
 
-!appendix 96-05-07
+!appendix
 
 !section A.13(13)
 !subject Exception raised at end of text stream

Questions? Ask the ACAA Technical Agent