CVS difference for ais/ai-00270.txt

Differences between 1.6 and version 1.7
Log of other versions for file ais/ai-00270.txt

--- ais/ai-00270.txt	2003/06/28 00:33:31	1.6
+++ ais/ai-00270.txt	2005/04/13 05:37:04	1.7
@@ -1,6 +1,7 @@
-!standard 13.13.02 (02)                               03-05-03  AI95-00270/05
+!standard 13.13.02 (02)                               05-03-30  AI95-00270/06
 !standard 13.13.02 (09/1)
 !standard 13.13.02 (17)
+!standard 13.3 (77)
 !class amendment 01-05-25
 !status Amendment 200Y 03-02-18
 !status WG9 approved 03-06-20
@@ -13,7 +14,7 @@
 
 !summary
 
-A Stream_Size (operational) attribute is introduced to support control of
+A Stream_Size (representation) attribute is introduced to support control of
 the size of items when written to a stream.
 
 The default implementation of a stream attribute only reads or writes enough
@@ -36,7 +37,7 @@
 
 Insert before 13.13.2(2):
 
-For every subtype S of an elementary type T, the following operational
+For every subtype S of an elementary type T, the following representation
 attribute is defined:
 
 S'Stream_Size
@@ -56,13 +57,26 @@
 
 Implementation Advice
 
-The recommended level of support for the Stream_Size attribute is:  A
-Stream_Size clause should be supported for an elementary type T if the
-specified Stream_Size is a multiple of Stream_Element'Size and is no less than
-the size of the first subtype of T, and no greater than the size of the largest
-type of the same elementary class (signed integer, modular integer, floating
-point, ordinary fixed point, decimal fixed point, or access).
+If not specified, the value of Stream_Size for an elementary type should be
+the number of bits that corresponds to the minimum number of stream elements
+required by the first subtype of the type, rounded up to the nearest factor or
+multiple of the word size that is also a multiple of the stream element size.
+
+The recommended level of support for the Stream_Size attribute is:
+
+* A Stream_Size clause should be supported for an elementary type T if the
+  specified Stream_Size is a multiple of Stream_Element'Size and is no less
+  than the size of the first subtype of T, and no greater than the size of the
+  largest type of the same elementary class (signed integer, modular integer,
+  floating point, ordinary fixed point, decimal fixed point, or access).
+
+
+Replace the first sentence of 13.13.2(9/1) by:
 
+For elementary types, Read reads (and Write writes) the number of stream
+elements implied by the Stream_Size for the type T; the representation of
+those stream elements is implementation defined.
+
 Insert after 13.13.2(9/1):
 
 Constraint_Error is raised by the predefined Write attribute if the value of
@@ -73,12 +87,9 @@
 covers all values of the first subtype would require more than Stream_Size
 bits; otherwise the range is signed.
 
-Replace the Implementation Advice 13.13.2(17) by:
+Delete the Implementation Advice 13.13.2(17).
 
-By default, the predefined stream-oriented attributes for an elementary type
-should only read or write the minimum number of stream elements required by
-the first subtype of the type, rounded up to the nearest factor or multiple of
-the word size that is also a multiple of the stream element size.
+Add Stream_Size to the list in 13.3(77).
 
 !discussion
 
@@ -131,40 +142,60 @@
 
 !example
 
+!corrigendum 13.3(77)
+
+@drepl
+@s9<@xindent<8  The following language-defined attributes are specifiable, at
+least for some of the kinds of entities to which they apply: Address, Size,
+Component_Size, Alignment, External_Tag, Small, Bit_Order, Storage_Pool,
+Storage_Size, Write, Output, Read, Input, and Machine_Radix.>>
+@dby
+@s9<@xindent<8  The following language-defined attributes are specifiable, at
+least for some of the kinds of entities to which they apply: Address, Size,
+Component_Size, Alignment, External_Tag, Small, Bit_Order, Storage_Pool,
+Storage_Size, Stream_Size, Write, Read, Output, Input, and Machine_Radix.>>
+
 !corrigendum 13.13.2(2)
 
 @dinsb
 For every subtype S of a specific type @i<T>, the following attributes are
 defined.
 @dinss
-For every subtype S of an elementary type T, the following operational
+For every subtype S of an elementary type @i<T>, the following representation
 attribute is defined:
 
 @xhang<@xterm<S'Stream_Size>
 Denotes the number of bits occupied in a stream by items of subtype S.
 Hence, the number of stream elements required per item of elementary
-type T is:>
-@xcode<        T'Stream_Size / Ada.Streams.Stream_Element'Size>
+type @i<T> is:>
+@xcode<        @i<T>'Stream_Size / Ada.Streams.Stream_Element'Size>
 
-@xindent<The value of this attribute is of type universal_integer and is a
-multiple of Stream_Element'Size.>
+@xindent<The value of this attribute is of type @i<universal_integer> and is
+a multiple of Stream_Element'Size.>
 
 @xindent<Stream_Size may be specified for first subtypes via an
-attribute_definition_clause; the expression of such a clause shall
+@fa<attribute_definition_clause>; the @fa<expression> of such a clause shall
 be static, non-negative, and a multiple of Stream_Element'Size.>
 
 @i<@s8<Implementation Advice>>
+
+If not specified, the value of Stream_Size for an elementary type should be the
+number of bits that corresponds to the minimum number of stream elements
+required by the first subtype of the type, rounded up to the nearest factor or
+multiple of the word size that is also a multiple of the stream element size.
 
-The recommended level of support for the Stream_Size attribute is:  A
-Stream_Size clause should be supported for an elementary type T if the
+The recommended level of support for the Stream_Size attribute is:
+
+@xbullet<A
+Stream_Size clause should be supported for an elementary type @i<T> if the
 specified Stream_Size is a multiple of Stream_Element'Size and is no less than
-the size of the first subtype of T, and no greater than the size of the largest
-type of the same elementary class (signed integer, modular integer, floating
-point, ordinary fixed point, decimal fixed point, or access).
+the size of the first subtype of @i<T>, and no greater than the size of the
+largest type of the same elementary class (signed integer, modular integer,
+floating point, ordinary fixed point, decimal fixed point, or access).>
 
 !corrigendum 13.13.2(9/1)
 
-@dinsa
+@drepl
 For elementary types, the representation in terms of stream elements is
 implementation defined. For composite types, the Write or Read attribute for
 each component is called in canonical order, which is last dimension varying
@@ -178,7 +209,22 @@
 specified and the attribute of any ancestor type of the type of any of the
 extension components which are of a limited type has not been specified, the
 attribute of @i<T> shall be directly specified.
-@dinst
+@dby
+For elementary types, Read reads (and Write writes) the number of stream
+elements implied by the Stream_Size for the type @i<T>; the representation
+of those stream elements is implementation defined. For composite types, the
+Write or Read attribute for each component is called in canonical order, which
+is last dimension varying fastest for an array, and positional aggregate order
+for a record. Bounds are not included in the stream if @i<T> is an array type.
+If @i<T> is a discriminated type, discriminants are included only if they have
+defaults. If @i<T> is a tagged type, the tag is not included. For type
+extensions, the Write or Read attribute for the parent type is called, followed
+by the Write or Read attribute of each component of the extension part, in
+canonical order. For a limited type extension, if the attribute of any ancestor
+type of @i<T> has been directly specified and the attribute of any ancestor
+type of the type of any of the extension components which are of a limited type
+has not been specified, the attribute of @i<T> shall be directly specified.
+
 Constraint_Error is raised by the predefined Write attribute if the value of
 the elementary item is outside the range of values representable using
 Stream_Size bits. For a signed integer type, an enumeration type, or a
@@ -189,16 +235,11 @@
 
 !corrigendum 13.13.2(17)
 
-@drepl
+@ddel
 If a stream element is the same size as a storage element, then the normal
 in-memory representation should be used by Read and Write for scalar objects.
 Otherwise, Read and Write should use the smallest number of stream elements
 needed to represent all values in the base range of the scalar type.
-@dby
-By default, the predefined stream-oriented attributes for an elementary type
-should only read or write the minimum number of stream elements required by the
-first subtype of the type, rounded up to the nearest factor or multiple of the
-word size that is also a multiple of the stream element size.
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent