CVS difference for ai12s/ai12-0087-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai12s/ai12-0087-1.txt

--- ai12s/ai12-0087-1.txt	2013/11/01 00:26:21	1.1
+++ ai12s/ai12-0087-1.txt	2015/10/08 22:17:01	1.2
@@ -1,4 +1,6 @@
-!standard 3.5(27)                                  13-10-31    AI12-0087-1/01
+!standard 3.5(15)                                  15-10-08    AI12-0087-1/02
+!standard 3.5(55.4/4)
+!standard 3.6.2(10)
 !class Amendment 13-10-31
 !status work item 13-10-31
 !status received 13-09-03
@@ -21,7 +23,50 @@
 
 !wording
 
-** TBD. Probably add this after 3.5(27).
+Add after 3.5(15) [Author's note: This is before the first of the function
+attributes][Editor's note: I thought that the appropriate place was just
+before the image attribute, after all of the important ones (3.5(27)); not
+a big deal either way]:
+
+S'Default_Value
+    S'Default_Value denotes the value of the Default_Value aspect of the
+    type of S.
+
+S'Has_Default_Value
+    If the type of S has the Default_Value aspect defined, then
+    S'Has_Default_Value returns True; otherwise, it returns False.
+
+Add after 3.5(55.4/4)):
+
+Legality Rules
+
+It is illegal to evaluate S'Default_Value when the type of S does not have
+the Default_Value aspect defined. If this Legality Rule is violated in an
+instance of a generic unit then Program_Error is raised at the point of the
+violation.
+
+[Editor's note: I'd borrow the wording from 3.2.4(26/3) and 3.2.4(29.1/4) for
+the above, as that is the closest analog in the Standard. The second sentence
+is close (but it should be under Dynamic Semantics); the first is very
+different for no obvious reason.]
+
+Add after 3.6.2(10):
+
+A'Default_Component_Value
+   For an array with a scalar component type, A'Default_Component_Value
+   denotes the value of the Default_Component_Value aspect of A.
+
+A'Has_Default_Component_Value
+   For an array with a scalar component type, if A has the
+   Default_Component_Value aspect defined, then
+   A'Has_Default_Component_Value returns True; otherwise, it returns False.
+
+Legality Rules
+
+It is illegal to evaluate A'Default_Component_Value when A does not have
+the Default_Component_Value aspect defined. If this Legality Rule is
+violated in an instance of a generic unit then Program_Error is raised
+at the point of the violation.
 
 !discussion
 
@@ -165,5 +210,54 @@
   with Default_Value => My_Default_Int_Value;
 
 but I feel that an attribute would be preferable.
+
+****************************************************************
+
+From: Jean-Pierre Rosen
+Sent: Tuesday, September 8, 2015  12:09 AM
+
+[Replying to version /02 of this AI - Editor.]
+
+> Add to the list of attributes in 3.5 (I would suggest before the first 
+> of the function attributes, i.e. after (15)):
+> 
+> S'Default_Value S'Default_Value denotes the value of the Default_Value 
+> aspect of the type of S.
+> 
+> S'Has_Default_Value If the type of S has the Default_Value aspect 
+> defined, then S'Has_Default_Value returns True; otherwise, it returns False.
+ 
+This might have been discussed before, but what about applying these attributes
+to record components?
+
+****************************************************************
+
+From: Jeff Cousins
+Sent: Wednesday, September 9, 2015  8:38 AM
+
+Default_Component_Value was added at Madrid.  Presumably record components
+would similarly be limited to components of a scalar type.
+We'd have to invent some syntax such as:
+
+S.<component_name>'Default_Value
+
+But then we ought to have corresponding syntax for setting the default value
+(in addition to the current method), such as:
+
+with <component_name>.Default_Value => ...
+or
+with Default_Value (<component1_name> => ..., <component2_name> => ..., ...) (I
+quite like that second alternative).
+
+I think this would be venturing into a new AI.
+
+****************************************************************
+
+From: Jeff Cousins
+Sent: Thursday, September 22, 2015  7:31 AM
+
+I don't think we say for 'First or 'Last that the attribute cannot be set by
+the user (as an attribute, of course the user sets it when he defines the
+range of whatever it refers to).
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent