CVS difference for ai05s/ai05-0004-1.txt

Differences between 1.9 and version 1.10
Log of other versions for file ai05s/ai05-0004-1.txt

--- ai05s/ai05-0004-1.txt	2007/05/05 01:39:14	1.9
+++ ai05s/ai05-0004-1.txt	2007/08/07 01:16:16	1.10
@@ -1,8 +1,9 @@
-!standard C.7.1(17/2)                               07-04-27  AI05-0004-1/06
+!standard C.7.1(17/2)                               07-08-03  AI05-0004-1/07
 !standard 1.1.4(14.1/2)
 !standard 3.8(11)
 !standard 3.8(13.1/2)
 !standard 3.9.4(22/2)
+!standard 3.9.4(29/2)
 !standard 3.10.2(12.2/2)
 !standard 4.1(7)
 !standard 4.3.3(32)
@@ -67,6 +68,8 @@
 
 18) 7.4(10) should include access_definition.
 
+19) The mode of Person in Remove_First in 3.9.4(29/2) should be "out" not "in".
+
 !question
 
 1) Does C.7.1(17/2) apply to calls to Current_Task in an entry barrier? (Yes.)
@@ -139,6 +142,9 @@
 kinds of types that can occur there, but it does not list (anonymous) access_definition.
 One presumes that it too should be elaborated here.
 
+19) The mode of Person in Remove_First in 3.9.4(29/2) does not match that of the
+interface that it is derived from. Is that correct? (No.)
+
 [Other questions here.]
 
 !recommendation
@@ -183,6 +189,9 @@
 
 18) 7.4(10) should say "subtype_indication{, access_definition,} or".
 
+19) 3.9.4(29/2) should be changed as follows:
+  "procedure Remove_First (Q : in out Fast_Food_Queue; Person : {out}[in] Person_Name);"
+
 !discussion
 
 1) entry_barrier is syntactically within entry_body. C.7.1(17/2) however, says
@@ -257,6 +266,9 @@
 types should be elaborated; it would be weird to omit one (even if it doesn't do anything
 interesting).
 
+19) The mode needs to match that of the primitive subprogram of the interface that we're
+deriving from.
+
 !corrigendum 1.1.4(14.1/2)
 
 @drepl
@@ -307,6 +319,21 @@
 --@ft<@i< Append raises Queue_Error if Cur_Count(Q) = Max_Count(Q)>>
 --@ft<@i< Remove_First raises Queue_Error if Cur_Count(Q) = 0>>
 
+!corrigendum 3.9.4(29/2)
+
+@drepl
+@xcode<@b<type> Fast_Food_Queue @b<is new> Queue @b<with record> ...;
+@b<procedure> Append(Q : @b<in out> Fast_Food_Queue; Person : @b<in> Person_Name);
+@b<procedure> Remove_First(Q : @b<in out> Fast_Food_Queue; Person : @b<in> Person_Name);
+@b<function> Cur_Count(Q : @b<in> Fast_Food_Queue) @b<return> Natural;
+@b<function> Max_Count(Q : @b<in> Fast_Food_Queue) @b<return> Natural;>
+@dby
+@xcode<@b<type> Fast_Food_Queue @b<is new> Queue @b<with record> ...;
+@b<procedure> Append(Q : @b<in out> Fast_Food_Queue; Person : @b<in> Person_Name);
+@b<procedure> Remove_First(Q : @b<in out> Fast_Food_Queue; Person : @b<out> Person_Name);
+@b<function> Cur_Count(Q : @b<in> Fast_Food_Queue) @b<return> Natural;
+@b<function> Max_Count(Q : @b<in> Fast_Food_Queue) @b<return> Natural;>
+
 !corrigendum 3.10.2(12.2/2)
 
 @drepl
@@ -739,3 +766,39 @@
 
 ****************************************************************
 
+!topic mode error in code example
+!reference Ada 2005 RM3.9.4(29/2)
+!from Author Pascal Pignard 07-07-28
+!discussion
+
+
+In the following section of Ada Reference Manual, ISO/IEC 8652:2007(E) Ed. 3:
+3.9.4 Interface Types
+...
+
+28/2
+Example use of the interface:
+29/2
+type Fast_Food_Queue is new Queue with record ...;
+procedure Append(Q : in out Fast_Food_Queue; Person : in Person_Name); -- error : mode of "Person" does not match
+procedure Remove_First(Q : in out Fast_Food_Queue; Person : in Person_Name);
+
+Should be:
+procedure Append(Q : in out Fast_Food_Queue; Person : [in]{out} Person_Name); 
+Because of previous declaration:
+23/2
+type Synchronized_Queue is synchronized interface and Queue; -- see 9.11
+procedure Append_Wait(Q : in out Synchronized_Queue;
+Person : in Person_Name) is abstract;
+procedure Remove_First_Wait(Q : in out Synchronized_Queue;
+Person : out Person_Name) is abstract;
+
+
+****************************************************************
+
+From: Christoph Grein
+Sent: Wednesday, August 1, 2007  1:26 AM
+
+Correction: Remove_First is wrong, not Append
+
+****************************************************************

Questions? Ask the ACAA Technical Agent