CVS difference for ais/ai-00433.txt
--- ais/ai-00433.txt 2005/05/18 22:07:50 1.1
+++ ais/ai-00433.txt 2005/06/16 23:47:46 1.2
@@ -1,4 +1,8 @@
-!standard 2.8(29) 05-05-18 AI95-00433/01
+!standard 1.1.4(9) 05-05-19 AI95-00433/02
+!standard 2.3(8)
+!standard 2.5(5)
+!standard 2.6(9)
+!standard 2.8(29)
!standard 3.2.2(15)
!standard 3.3.1(27)
!standard 3.3.1(29)
@@ -6,14 +10,15 @@
!standard 3.3.1(33)
!standard 3.6(30)
!standard 3.7(37)
-!standard 3.9.2(14)
+!standard 3.9.4(1)
!standard 3.10(22)
!standard 3.10.1(19)
!standard 3.10.1(20)
!standard 3.10.1(21)
!standard 4.3.3(43)
-!standard 6.5.1(9)
-!standard 6.7(4)
+!standard 4.4(15)
+!standard 6.5.1(1)
+!standard 6.7(1)
!standard 9.1(24)
!standard 9.11(3)
!standard 9.11(6)
@@ -21,13 +26,15 @@
!standard 9.11(8)
!standard 9.11(9)
!standard 9.11(10)
-!standard 10.1.2(24)
+!standard 10.1.2(8)
!standard 11.3(6)
+!standard 11.4.3(6)
!standard 12.5.5(5)
!standard 12.6(18)
!standard 12.7(11)
!class amendment 05-05-18
!status Amendment 200Y 05-05-18
+!comment This AI is in the Amendment, but not yet approved.
!status work item 05-05-18
!status received 05-05-18
!priority High
@@ -53,56 +60,109 @@
!discussion
-(See proposal.)
+The example of AI-407 depends on the example of 3.9.4 given here.
!example
An example for examples? Get real!
+!corrigendum 1.1.4(9)
+
+@drepl
+@fa<return_statement> ::= @b<return> [@fa<expression>];@hr
+@fa<return_statement> ::= @b<return>; | @b<return> @fa<expression>;
+@dby
+@fa<simple_return_statement> ::= @b<return> [@fa<expression>];@hr
+@fa<simple_return_statement> ::= @b<return>; | @b<return> @fa<expression>;
+
+
+!corrigendum 2.3(8)
+
+@drepl
+@xcode<Count X Get_Symbol Ethelyn Marion@hr
+Snobol_4 X1 Page_Count Store_Next_Item>
+@dby
+@xcode<Count X Get_Symbol Ethelyn Marion
+Snobol_4 X1 Page_Count Store_Next_Item
+@unicode<928>@unicode<955>@unicode<940>@unicode<964>@unicode<969>@unicode<957> --@ft<@i< Plato>>
+@unicode<1063>@unicode<1072>@unicode<1081>@unicode<1082>@unicode<1086>@unicode<1074>@unicode<1089>@unicode<1082>@unicode<1080>@unicode<1081> --@ft<@i< Tchaikovsky>>
+@unicode<952> @unicode<966> --@ft<@i< Angles>>>
+
+
+!corrigendum 2.5(5)
+
+@drepl
+@xcode<'A' '*' ''' ' '>
+@dby
+@xcode<'A' '*' ''' ' '
+'L' '@unicode<1051>' '@unicode<923>' --@ft<@i< various els>>
+'@unicode<8734>' '@unicode<1488>' --@ft<@i< Big numbers - infinity and aleph>>>
+
+
+!corrigendum 2.6(9)
+
+@drepl
+@xcode<"Message of the day:"
+
+"" --@ft<@i< a null string literal>>
+" " "A" """" --@ft<@i< three string literals of length 1>>
+
+"Characters such as $, %, and } are allowed in string literals">
+@dby
+@xcode<"Message of the day:"
+
+"" --@ft<@i< a null string literal>>
+" " "A" """" --@ft<@i< three string literals of length 1>>
+
+"Characters such as $, %, and } are allowed in string literals"
+"Archimedes said ""@unicode<917>@unicode<973>@unicode<961>@unicode<951>@unicode<954>@unicode<945>"""
+"Volume of cylinder (@pir@unicode<178>h) = ">
+
+
!corrigendum 2.8(29)
@drepl
-@xcode<@b<pragma> List(Off); @ft<@i<-- turn off listing generation>>
-@b<pragma> Optimize(Off); @ft<@i<-- turn off optional optimizations>>
-@b<pragma> Inline(Set_Mask); @ft<@i<-- generate code for Set_Mask inline>>
-@b<pragma> Suppress(Range_Check, On =@> Index); @ft<@i<-- turn off range checking on Index>>>
+@xcode<@b<pragma> List(Off); --@ft<@i< turn off listing generation>>
+@b<pragma> Optimize(Off); --@ft<@i< turn off optional optimizations>>
+@b<pragma> Inline(Set_Mask); --@ft<@i< generate code for Set_Mask inline>>
+@b<pragma> Suppress(Range_Check, On =@> Index); --@ft<@i< turn off range checking on Index>>>
@dby
-@xcode<@b<pragma> List(Off); @ft<@i<-- turn off listing generation>>
-@b<pragma> Optimize(Off); @ft<@i<-- turn off optional optimizations>>
-@b<pragma> Inline(Set_Mask); @ft<@i<-- generate code for Set_Mask inline>>
-@b<pragma> Import(C, Put_Char, External_Name =@> "putchar"); @ft<@i<-- import C putchar function>>>
+@xcode<@b<pragma> List(Off); --@ft<@i< turn off listing generation>>
+@b<pragma> Optimize(Off); --@ft<@i< turn off optional optimizations>>
+@b<pragma> Inline(Set_Mask); --@ft<@i< generate code for Set_Mask inline>>
+@b<pragma> Import(C, Put_Char, External_Name =@> "putchar"); --@ft<@i< import C putchar function>>>
!corrigendum 3.2.2(15)
@drepl
-@xcode<@b<subtype> Rainbow @b<is> Color @b<range> Red .. Blue; @ft<@i<-- see 3.2.1>>
+@xcode<@b<subtype> Rainbow @b<is> Color @b<range> Red .. Blue; --@ft<@i< see 3.2.1>>
@b<subtype> Red_Blue @b<is> Rainbow;
@b<subtype> Int @b<is> Integer;
@b<subtype> Small_Int @b<is> Integer @b<range> -10 .. 10;
-@b<subtype> Up_To_K @b<is> Column @b<range> 1 .. K; @ft<@i<-- see 3.2.1>>
-@b<subtype> Square @b<is> Matrix(1 .. 10, 1 .. 10); @ft<@i<-- see 3.6>>
-@b<subtype> Male @b<is> Person(Sex =@> M); @ft<@i<-- see 3.10.1>>>
+@b<subtype> Up_To_K @b<is> Column @b<range> 1 .. K; --@ft<@i< see 3.2.1>>
+@b<subtype> Square @b<is> Matrix(1 .. 10, 1 .. 10); --@ft<@i< see 3.6>>
+@b<subtype> Male @b<is> Person(Sex =@> M); --@ft<@i< see 3.10.1>>>
@dby
-@xcode<@b<subtype> Rainbow @b<is> Color @b<range> Red .. Blue; @ft<@i<-- see 3.2.1>>
+@xcode<@b<subtype> Rainbow @b<is> Color @b<range> Red .. Blue; --@ft<@i< see 3.2.1>>
@b<subtype> Red_Blue @b<is> Rainbow;
@b<subtype> Int @b<is> Integer;
@b<subtype> Small_Int @b<is> Integer @b<range> -10 .. 10;
-@b<subtype> Up_To_K @b<is> Column @b<range> 1 .. K; @ft<@i<-- see 3.2.1>>
-@b<subtype> Square @b<is> Matrix(1 .. 10, 1 .. 10); @ft<@i<-- see 3.6>>
-@b<subtype> Male @b<is> Person(Sex =@> M); @ft<@i<-- see 3.10.1>>
-@b<subtype> Binop_Ref @b<is not null> Binop_Ptr; @ft<@i<-- see 3.10>>>
+@b<subtype> Up_To_K @b<is> Column @b<range> 1 .. K; --@ft<@i< see 3.2.1>>
+@b<subtype> Square @b<is> Matrix(1 .. 10, 1 .. 10); --@ft<@i< see 3.6>>
+@b<subtype> Male @b<is> Person(Sex =@> M); --@ft<@i< see 3.10.1>>
+@b<subtype> Binop_Ref @b<is not null> Binop_Ptr; --@ft<@i< see 3.10>>>
!corrigendum 3.3.1(27)
@drepl
-@xcode<John, Paul : Person_Name := @b<new> Person(Sex =@> M); @ft<@i<-- see 3.10.1>>>
+@xcode<John, Paul : Person_Name := @b<new> Person(Sex =@> M); --@ft<@i< see 3.10.1>>>
@dby
-@xcode<John, Paul : @b<not null> Person_Name := @b<new> Person(Sex =@> M); @ft<@i<-- see 3.10.1>>>
+@xcode<John, Paul : @b<not null> Person_Name := @b<new> Person(Sex =@> M); --@ft<@i< see 3.10.1>>>
!corrigendum 3.3.1(29)
@@ -132,7 +192,8 @@
Sorted : Boolean := False;
Color_Table : @b<array>(1 .. Max) @b<of> Color;
Option : Bit_Vector(1 .. 10) := (@b<others> =@> True);
-Hello : @b<aliased> String := "Hi, world.";>
+Hello : @b<aliased> String := "Hi, world.";
+@unicode<952>, @unicode<966> : Float @b<range> -@pi .. +@pi;>
!corrigendum 3.3.1(33)
@@ -146,7 +207,7 @@
@xcode<Limit : @b<constant> Integer := 10_000;
Low_Limit : @b<constant> Integer := Limit/10;
Tolerance : @b<constant> Real := Dispersion(1.15);
-Hello_Msg : @b<constant access> String := Hello'Access; @ft<@i<-- see 3.10.2>>>
+Hello_Msg : @b<constant access> String := Hello'Access; --@ft<@i< see 3.10.2>>>
!corrigendum 3.6(30)
@@ -154,20 +215,20 @@
@drepl
@xcode<Grid : @b<array>(1 .. 80, 1 .. 100) @b<of> Boolean;
Mix : @b<array>(Color @b<range> Red .. Green) @b<of> Boolean;
-Page : @b<array>(Positive @b<range> <@>) @b<of> Line := @ft<@i<-- an array of arrays>>
- (1 | 50 =@> Line'(1 | Line'Last =@> '+', @b<others> =@> '-'), @ft<@i<-- see 4.3.3>>
+Page : @b<array>(Positive @b<range> <@>) @b<of> Line := --@ft<@i< an array of arrays>>
+ (1 | 50 =@> Line'(1 | Line'Last =@> '+', @b<others> =@> '-'), --@ft<@i< see 4.3.3>>
2 .. 49 =@> Line'(1 | Line'Last =@> '|', @b<others> =@> ' '));
- @ft<@i<-- Page is constrained by its initial value to (1..50)>>>
+ --@ft<@i< Page is constrained by its initial value to (1..50)>>>
@dby
-@xcode<Grid : @b<array>(1 .. 80, 1 .. 100) @b<of> Boolean;
+@xcode<Grid : @b<array>(1 .. 80, 1 .. 100) @b<of> Boolean;
Mix : @b<array>(Color @b<range> Red .. Green) @b<of> Boolean;
Msg_Table : @b<constant array>(Error_Code) @b<of access constant> String :=
(Too_Big =@> @b<new> String'("Result too big"), Too_Small =@> ...);
-Page : @b<array>(Positive @b<range> <@>) @b<of> Line := @ft<@i<-- an array of arrays>>
- (1 | 50 =@> Line'(1 | Line'Last =@> '+', @b<others> =@> '-'), @ft<@i<-- see 4.3.3>>
+Page : @b<array>(Positive @b<range> <@>) @b<of> Line := --@ft<@i< an array of arrays>>
+ (1 | 50 =@> Line'(1 | Line'Last =@> '+', @b<others> =@> '-'), --@ft<@i< see 4.3.3>>
2 .. 49 =@> Line'(1 | Line'Last =@> '|', @b<others> =@> ' '));
- @ft<@i<-- Page is constrained by its initial value to (1..50)>>>
+ --@ft<@i< Page is constrained by its initial value to (1..50)>>>
!corrigendum 3.7(37)
@@ -176,22 +237,26 @@
@xcode<@b<type> Item(Number : Positive) @b<is
record>
Content : Integer;
- @ft<@i<-- no component depends on the discriminant>>
+ --@ft<@i< no component depends on the discriminant>>
@b<end record>;>
@dby
@xcode<@b<task type> Worker(Prio : System.Priority; Buf : @b<access> Buffer) @b<is>
- @ft<@i<-- discriminants used to parameterize the task type (see 9.1)>>
- @b<pragma> Priority(Prio); @ft<@i<-- see D.1>>
+ --@ft<@i< discriminants used to parameterize the task type (see 9.1)>>
+ @b<pragma> Priority(Prio); --@ft<@i< see D.1>>
@b<entry> Fill;
@b<entry> Drain;
@b<end> Worker;>
-!corrigendum 3.9.2(14)
+!corrigendum 3.9.4(1)
+!comment This is not the full section, see the conflict files for that.
@dinsa
-Nonlimited interface types have predefined nonabstract equality operators. These may be overridden with user-defined abstract equality operators. Such operators will then require an explicit overriding for any nonabstract descendant of the interface.
+Nonlimited interface types have predefined nonabstract equality operators.
+These may be overridden with user-defined abstract equality operators. Such
+operators will then require an explicit overriding for any nonabstract
+descendant of the interface.
@dinss
@i<@s8<Examples>>
@@ -199,50 +264,81 @@
@i<Example of limited interface and synchronized interface extending it:>
@xcode<@b<type> Queue @b<is limited interface>;
-@b<procedure> Append(Q : @b<in out> Queue; Elem : @b<in> Element) @b<is abstract>;
-@b<procedure> Remove_First(Q : @b<in out> Queue; Elem : @b<out> Element) @b<is abstract>;
+@b<procedure> Append(Q : @b<in out> Queue; Element : @b<in> Person_Name) @b<is abstract>;
+@b<procedure> Remove_First(Q : @b<in out> Queue; Element : @b<out> Person_Name) @b<is abstract>;
@b<function> Cur_Count(Q : @b<in> Queue) @b<return> Natural @b<is abstract>;
@b<function> Max_Count(Q : @b<in> Queue) @b<return> Natural @b<is abstract>;
+-- @ft<@i<See 3.10.1 for Person_Name.>>
Queue_Error : @b<exception>;
-@ft<@i<-- Append raises Queue_Error if Count(Q) = Max_Count(Q)
--- e_Error if Count(Q) = 0>>
+--@ft<@i< Append raises Queue_Error if Count(Q) = Max_Count(Q)>>
+--@ft<@i< Remove_First raises Queue_Error if Count(Q) = 0>>
-@b<type> Synchronized_Queue @b<is synchronized interface and> Queue; @ft<@i<-- see 9.11>>
-@b<procedure> Append_Wait(Q : @b<in out> Queue; Elem : @b<in> Element) @b<is abstract>;
-@b<procedure> Remove_First_Wait(Q : @b<in out> Queue; Elem : @b<out> Element) @b<is abstract>;
+@b<type> Synchronized_Queue @b<is synchronized interface and> Queue; --@ft<@i< see 9.11>>
+@b<procedure> Append_Wait(Q : @b<in out> Queue; Element : @b<in> Person_Name) @b<is abstract>;
+@b<procedure> Remove_First_Wait(Q : @b<in out> Queue; Element : @b<out> Person_Name) @b<is abstract>;
...
@b<procedure> Transfer(From : @b<in out> Queue'Class;
To : @b<in out> Queue'Class;
- Number : @b<in> Natural := 1) is
- Elem : Element;
-@b<begin
- for> I @b<in> 1..Number @b<loop>
- Remove_First(From, Elem);
- Append(To, Elem);
+ Number : @b<in> Natural := 1) @b<is>
+ Element : Person_Name_Name;
+@b<begin>
+ @b<for> I @b<in> 1..Number @b<loop>
+ Remove_First(From, Element);
+ Append(To, Element);
@b<end loop>;
@b<end> Transfer;>
+This defines a Queue interface defining a queue of people. (A similar
+design could be created to define any kind of queue simply by replacing
+Person_Name by an appropriate type.)
The Queue interface has four dispatching operations, Append,
-Remove_First, Cur_Count, and Max_Count. The body of a class-wide
-operation, Transfer is also shown. Every non-abstract extension
+Remove_First, Cur_Count, and Max_Count. The body of a class-wide
+operation, Transfer is also shown. Every non-abstract extension
of Queue must provide implementations for at least its four
-dispatching operations. Any object of a type derived from Queue
-may be passed to Transfer, as either the From or the To operand.
-The two operands need not be of the same type in any given call.
+dispatching operations, as they are abstract. Any object of a type
+derived from Queue may be passed to Transfer, as either the From
+or the To operand. The two operands need not be of the same type
+in any given call.
The Synchronized_Queue interface inherits the four dispatching
operations from Queue, and adds two additional dispatching
operations, which wait if necessary rather than raising the
-Queue_Error exception. This synchronized interface may only
+Queue_Error exception. This synchronized interface may only
be implemented by a task or protected type, and as such
ensures safe concurrent access.
+
+@i<Example use of an interface:>
+
+@b<type> Fast_Food_Queue @b<is new> Queue @b<with record> ...;
+@b<procedure> Append (Q : @b<in out> Fast_Food_Queue; Element : @b<in> Person_Name);
+@b<procedure> Remove_First (Q : @b<in out> Fast_Food_Queue; Element : @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;
+
+...
+
+Cashier, Counter : Fast_Food_Queue;
+
+...
+-- @ft<@i<Add George (see 3.10.1) to the cashier's queue:>>
+Append (Cashier, George);
+-- @ft<@i<After payment, move George to the sandwich counter queue:>>
+Transfer (Cashier, Counter);
+...
-@i<Example of task interface:>
+An interface such as Queue can be used directly as the parent of a new type
+(as shown here), or can be added when a new type is derived from another type.
+In either case, the primitive operations of the interface are inherited. For
+Queue, the implementation of the four inherited routines must be provided.
+Inside the call of Transfer, dispatching calls to the implementations of
+Append and Remove_First for type Fast_Food_Queue will be made.
-@xcode<@b<type> Serial_Device @b<is task interface>; @ft<@i<-- see 9.1>>
+@i<Example of a task interface:>
+
+@xcode<@b<type> Serial_Device @b<is task interface>; --@ft<@i< see 9.1>>
@b<procedure> Read (Dev : @b<in> Serial_Device; C : @b<out> Character) @b<is abstract>;
@b<procedure> Write(Dev : @b<in> Serial_Device; C : @b<in> Character) @b<is abstract>;>
@@ -253,25 +349,25 @@
!corrigendum 3.10(22)
@drepl
-@xcode<@b<type> Peripheral_Ref @b<is access> Peripheral; @ft<@i<-- see 3.8.1>>
+@xcode<@b<type> Peripheral_Ref @b<is access> Peripheral; --@ft<@i< see 3.8.1>>
@b<type> Binop_Ptr @b<is access all> Binary_Operation'Class;
- @ft<@i<-- general access-to-class-wide, see 3.9.1>>>
+ --@ft<@i< general access-to-class-wide, see 3.9.1>>>
@dby
-@xcode<@b<type> Peripheral_Ref @b<is not null access> Peripheral; @ft<@i<-- see 3.8.1>>
+@xcode<@b<type> Peripheral_Ref @b<is not null access> Peripheral; --@ft<@i< see 3.8.1>>
@b<type> Binop_Ptr @b<is access all> Binary_Operation'Class;
- @ft<@i<-- general access-to-class-wide, see 3.9.1>>>
+ --@ft<@i< general access-to-class-wide, see 3.9.1>>>
!corrigendum 3.10.1(19)
@drepl
-@xcode<@b<type> Person(<@>); @ft<@i<-- incomplete type declaration>>
-@b<type> Car; @ft<@i<-- incomplete type declaration>>>
+@xcode<@b<type> Person(<@>); --@ft<@i< incomplete type declaration>>
+@b<type> Car; --@ft<@i< incomplete type declaration>>>
@dby
-@xcode<@b<type> Person(<@>); @ft<@i<-- incomplete type declaration>>
-@b<type> Car @b<is tagged>; @ft<@i<-- incomplete type declaration>>>
+@xcode<@b<type> Person(<@>); --@ft<@i< incomplete type declaration>>
+@b<type> Car @b<is tagged>; --@ft<@i< incomplete type declaration>>>
!corrigendum 3.10.1(20)
@@ -305,41 +401,115 @@
!corrigendum 4.3.3(43)
@dinsa
-@xcode<D : Bit_Vector(M .. N) := (M .. N =@> True); @ft<@i<-- see 3.6>>
+@xcode<D : Bit_Vector(M .. N) := (M .. N =@> True); --@ft<@i< see 3.6>>
E : Bit_Vector(M .. N) := (@b<others> =@> True);
-F : String(1 .. 1) := (1 =@> 'F'); @ft<@i<-- a one component aggregate: same as "F">>>
+F : String(1 .. 1) := (1 =@> 'F'); --@ft<@i< a one component aggregate: same as "F">>>
@dinss
-@i<Example of array aggregate with defaulted others choice, with applicable index constraint provided by an enclosing record aggregate:>
+@i<Example of array aggregate with defaulted others choice, with applicable
+index constraint provided by an enclosing record aggregate:>
-@xcode<Buffer'(Size =@> 50, Pos =@> 1, Value =@> String'('x', @b<others> =@> <@>)) @ft<@i<-- see 3.7>>>
+@xcode<Buffer'(Size =@> 50, Pos =@> 1, Value =@> String'('x', @b<others> =@> <@>)) --@ft<@i< see 3.7>>>
-!corrigendum 6.5.1(9)
+!corrigendum 4.4(15)
+@drepl
+@xcode<Volume --@ft<@i< primary>>
+@b<not> Destroyed --@ft<@i< factor>>
+2*Line_Count --@ft<@i< term>>
+-4.0 --@ft<@i< simple expression>>
+-4.0 + A --@ft<@i< simple expression>>
+B**2 - 4.0*A*C --@ft<@i< simple expression>>
+Password(1 .. 3) = "Bwv" --@ft<@i< relation>>
+Count @b<in> Small_Int --@ft<@i< relation>>
+Count @b<not in> Small_Int --@ft<@i< relation>>
+Index = 0 @b<or> Item_Hit --@ft<@i< expression>>
+(Cold @b<and> Sunny) @b<or> Warm --@ft<@i< expression (parentheses are required)>>
+A**(B**C) --@ft<@i< expression (parentheses are required)>>>
+@dby
+@xcode<Volume --@ft<@i< primary>>
+@b<not> Destroyed --@ft<@i< factor>>
+2*Line_Count --@ft<@i< term>>
+-4.0 --@ft<@i< simple expression>>
+-4.0 + A --@ft<@i< simple expression>>
+B**2 - 4.0*A*C --@ft<@i< simple expression>>
+R*Sin(@unicode<952>)*Cos(@unicode<966>) --@ft<@i< simple expression>>
+Password(1 .. 3) = "Bwv" --@ft<@i< relation>>
+Count @b<in> Small_Int --@ft<@i< relation>>
+Count @b<not in> Small_Int --@ft<@i< relation>>
+Index = 0 @b<or> Item_Hit --@ft<@i< expression>>
+(Cold @b<and> Sunny) @b<or> Warm --@ft<@i< expression (parentheses are required)>>
+A**(B**C) --@ft<@i< expression (parentheses are required)>>>
+
+
+!corrigendum 6.5.1(1)
+!Comment This is a new clause, so this a dummy and the real thing is in the
+!comment conflicts.
@dinsa
-If the body of a non-returning procedure completes normally, Program_Error is raised at the point of the call.
+If the body of a non-returning procedure completes normally, Program_Error is
+raised at the point of the call.
@dinss
-@i<@s8<Example>>
+@i<@s8<Examples>>
-@xcode<@b<procedure> Fail(Msg : String); @ft<@i<-- raises Fatal_Error exception>>
+@xcode<@b<procedure> Fail(Msg : String); --@ft<@i< raises Fatal_Error exception>>
@b<pragma> No_Return(Fail);
-@ft<@i<-- Inform compiler and reader that procedure never returns normally>>>
+ --@ft<@i< Inform compiler and reader that procedure never returns normally>>>
-!corrigendum 6.7(4)
+!corrigendum 6.7(1)
+!Comment This is a new clause, so this a dummy and the real thing is in the
+!comment conflicts.
@dinsa
-The execution of a null procedure is invoked by a subprogram call. For the execution of a subprogram call on a null procedure, the execution of the @fa<subprogram_body> has no effect.
+The execution of a null procedure is invoked by a subprogram call. For the
+execution of a subprogram call on a null procedure, the execution of the
+@fa<subprogram_body> has no effect.
@dinst
-@i<@s8<Example>>
+@i<@s8<Examples>>
+
+@xcode<@b<procedure> Simplify(Expr : @b<in out> Expression) @b<is null>; --@ft<@i< see 3.9>>
+--@ft<@i< By default, Simplify does nothing, but it may be overridden in extensions of Expression>>>
-@xcode<@b<procedure> Simplify(Expr : @b<in out> Expression) @b<is null>; @ft<@i<-- see 3.9
--- s nothing, but it may be overridden in extensions of Expression>>>
+!corrigendum 8.3.1(1)
+!Comment This is a new clause, so this a dummy and the real thing is in the
+!comment conflicts.
+
+@dinsa
+Indicator!
+@dinst
+@i<@s8<Examples>>
+
+The use of @fa<overriding_indicator>s allow the detection of errors at
+compile-time that otherwise might not be detected at all. For instance, we
+might declare a security queue derived from the Queue interface of 3.9.4 as:
+
+@xcode<@b<type> Security_Queue @b<is new> Queue @b<with record> ...;>
+
+@xcode<@b<overriding>
+@b<procedure> Append (Q : @b<in out> Security_Queue; Element : @b<in> Person_Name);>
+
+@xcode<@b<overriding>
+@b<procedure> Remove_First (Q : @b<in out> Security_Queue; Element : @b<in> Person_Name);>
+
+@xcode<@b<overriding>
+@b<function> Cur_Count (Q : @b<in> Security_Queue) @b<return> Natural;>
+
+@xcode<@b<overriding>
+@b<function> Max_Count (Q : @b<in> Security_Queue) @b<return> Natural;>
+
+@xcode<@b<not overriding>
+@b<procedure> Arrest (Q : @b<in out> Security_Queue; Element : @b<in> Person_Name);>
+
+The first four subprogram declarations guarantee that these subprograms will
+override the four subprograms inherited from the Queue interface. If a spelling
+error occurs in one of these declarations, an error will occur. Similarly, the
+declaration of Arrest guarantees that this is a new operation.
+
!corrigendum 9.1(24)
@drepl
@@ -350,7 +520,7 @@
@dby
@xcode<@b<task type> Keyboard_Driver(ID : Keyboard_ID := New_ID) @b<is>
- @b<new> Serial_Device @b<with> @ft<@i<-- see 3.9>>
+ @b<new> Serial_Device @b<with> --@ft<@i< see 3.9.4>>
@b<entry> Read (C : @b<out> Character);
@b<entry> Write(C : @b<in> Character);
@b<end> Keyboard_Driver;>
@@ -361,24 +531,24 @@
@drepl
@xcode<@b<task body> Producer @b<is>
Char : Character;
-@b<begin
- loop>
- ... @ft<@i<-- produce the next character Char>>
+@b<begin>
+ @b<loop>
+ ... --@ft<@i< produce the next character Char>>
Buffer.Write(Char);
@b<exit when> Char = ASCII.EOT;
- @b<end loop;
-end> Producer;>
+ @b<end loop>;
+@b<end> Producer;>
@dby
@xcode<@b<task body> Producer @b<is>
- Elem : Element;
-@b<begin
- loop>
- ... @ft<@i<-- produce the next element>>
- Buffer.Append_Wait(Elem);
- @b<exit when> Elem = EOT_Elem;
- @b<end loop;
-end> Producer;>
+ Element : Person_Name; --@ft<@i< see 3.10.1>>
+@b<begin>
+ @b<loop>
+ ... --@ft<@i< produce the next person (for instance, simulating arrivals)>>
+ Buffer.Append_Wait(Element);
+ @b<exit when> Element = @b<null>;
+ @b<end loop>;
+@b<end> Producer;>
!corrigendum 9.11(6)
@@ -390,33 +560,40 @@
loop>
Buffer.Read(Char);
@b<exit when> Char = ASCII.EOT;
- ... @ft<@i<-- consume the character Char>>
+ ... --@ft<@i< consume the character Char>>
@b<end loop;
end> Consumer;>
@dby
@xcode<@b<task body> Consumer @b<is>
- Elem : Element;
+ Element : Person_Name;
@b<begin
loop>
- Buffer.Remove_First_Wait(Elem);
- @b<exit when> Elem = EOT_Elem;
- ... @ft<@i<-- consume the element>>
- @b<end loop;
-end> Consumer;>
+ Buffer.Remove_First_Wait(Element);
+ @b<exit when> Element = @b<null>;
+ ... --@ft<@i< consume the person (for instance, simulating serving a customer)>>
+ @b<end loop>;
+@b<end> Consumer;>
!corrigendum 9.11(7)
@drepl
-The buffer object contains an internal pool of characters managed in a round-robin fashion. The pool has two indices, an In_Index denoting the space for the next input character and an Out_Index denoting the space for the next output character.
+The buffer object contains an internal pool of characters managed in a
+round-robin fashion. The pool has two indices, an In_Index denoting the space
+for the next input character and an Out_Index denoting the space for the next
+output character.
@dby
-The buffer object contains an internal pool of elements managed in a round-robin fashion. The pool has two indices, an In_Index denoting the space for the next input element and an Out_Index denoting the space for the next output element.
+The buffer object contains an internal pool of people managed in a round-robin
+fashion. The pool has two indices, an In_Index denoting the space for the next
+input element (person) and an Out_Index denoting the space for the next output
+element.
The Buffer is defined as an extension of the Synchronized_Queue
-interface (see 3.9.4), and as such, can be passed to the Transfer
-class-wide operation defined for objects of a type covered by
+interface (see 3.9.4), and as such, is promising to implement the abstraction
+defined by that interface. By doing so, the Buffer can be passed to the
+Transfer class-wide operation defined for objects of a type covered by
Queue'Class.
@@ -433,18 +610,18 @@
@b<end> Buffer;>
@dby
-@xcode<@b<protected> Buffer @b<is new> Synchronized_Queue @b<with> @ft<@i<-- see 3.9.4>>
- @b<entry> Append_Wait (Elem : @b<in> Element);
- @b<entry> Remove_First_Wait (Elem : @b<out> Element);
+@xcode<@b<protected> Buffer @b<is new> Synchronized_Queue @b<with> --@ft<@i< see 3.9.4>>
+ @b<entry> Append_Wait(Element : @b<in> Person_Name);
+ @b<entry> Remove_First_Wait(Element : @b<out> Person_Name);
@b<function> Cur_Count @b<return> Natural;
@b<function> Max_Count @b<return> Natural;
- @b<procedure> Append(Elem : @b<in> Element);
- @b<procedure> Remove_First(Elem : @b<out> Element);
+ @b<procedure> Append(Element : @b<in> Person_Name);
+ @b<procedure> Remove_First(Element : @b<out> Person_Name);
@b<private>
- Pool : Element_Array(1 .. 100);
+ Pool : Person_Name_Array(1 .. 100);
Count : Natural := 0;
In_Index, Out_Index : Positive := 1;
-@b<end> Buffer;
+@b<end> Buffer;>
!corrigendum 9.11(9)
@@ -460,19 +637,19 @@
@b<end> Write;>
@dby
-@xcode<@b<protected body> Buffer @b<is
- entry> Append_Wait (Elem : @b<in> Element)
- @b<when> Count < Pool'Length @b<is
- begin>
- Append(Elem);
+@xcode<@b<protected body> Buffer @b<is>
+ @b<entry> Append_Wait(Element : @b<in> Person_Name)
+ @b<when> Count < Pool'Length @b<is>
+ @b<begin>
+ Append(Element);
@b<end> Append_Wait;
- @b<procedure> Append(Elem : @b<in> Element) @b<is
- begin
- if> Count = Pool'Length @b<then
- raise> Queue_Error @b<with> "Buffer Full"; @ft<@i<-- see 11.3>>
+ @b<procedure> Append(Element : @b<in> Person_Name) @b<is>
+ @b<begin>
+ @b<if> Count = Pool'Length @b<then>
+ @b<raise> Queue_Error @b<with> "Buffer Full"; --@ft<@i< see 11.3>>
@b<end if>;
- Pool(In_Index) := Elem;
+ Pool(In_Index) := Element;
In_Index := (In_Index @b<mod> Pool'Length) + 1;
Count := Count + 1;
@b<end> Append;>
@@ -482,8 +659,8 @@
@drepl
@xcode< @b<entry> Read(C : @b<out> Character)
- @b<when> Count @> 0 @b<is
- begin>
+ @b<when> Count @> 0 @b<is>
+ @b<begin>
C := Pool(Out_Index);
Out_Index := (Out_Index @b<mod> Pool'Length) + 1;
Count := Count - 1;
@@ -491,55 +668,58 @@
@b<end> Buffer;>
@dby
-@xcode< @b<entry> Remove_First_Wait (Elem : @b<out> Element)
- @b<when> Count @> 0 @b<is
- begin>
- Remove_First(Elem);
+@xcode< @b<entry> Remove_First_Wait(Element : @b<out> Person_Name)
+ @b<when> Count @> 0 @b<is>
+ @b<begin>
+ Remove_First(Element);
@b<end> Remove_First_Wait;
- @b<procedure> Remove_First(Elem : @b<out> Element) @b<is
- begin
- if> Count = 0 @b<then
- raise> Queue_Error @b<with> "Buffer Empty"; @ft<@i<-- see 11.3>>
+ @b<procedure> Remove_First(Element : @b<out> Person_Name) @b<is>
+ @b<begin>
+ @b<if> Count = 0 @b<then>
+ @b<raise> Queue_Error @b<with> "Buffer Empty"; --@ft<@i< see 11.3>>
@b<end if>;
- Elem := Pool(Out_Index);
+ Element := Pool(Out_Index);
Out_Index := (Out_Index @b<mod> Pool'Length) + 1;
Count := Count - 1;
@b<end> Remove_First;
- @b<function> Cur_Count @b<return> Natural @b<is
- begin
- return> Buffer.Count;
+ @b<function> Cur_Count @b<return> Natural @b<is>
+ @b<begin>
+ @b<return> Buffer.Count;
@b<end> Cur_Count;
- @b<function> Max_Count @b<return> Natural @b<is
- begin
- return> Pool'Length;
+ @b<function> Max_Count @b<return> Natural @b<is>
+ @b<begin>
+ @b<return> Pool'Length;
@b<end> Max_Count;
@b<end> Buffer;>
-!corrigendum 10.1.2(24)
+!corrigendum 10.1.2(8)
+!comment There is a lot of text inserted here, so this a dummy and the real
+!comment thing is in the conflicts.
@dinsa
@xbullet<in the scope of a @fa<use_clause> which names an entity declared
within the declarative region of the @fa<library_item>.>
@dinss
-@i<@s8<Example>>
+@i<@s8<Examples>>
-@xcode<@b<limited with> Office.Departments; @ft<@i<-- types are incomplete>>
-@b<private with> Office.Locations; @ft<@i<-- only visible in private part>>
+@xcode<@b<limited with> Office.Departments; --@ft<@i< types are incomplete>>
+@b<private with> Office.Locations; --@ft<@i< only visible in private part>>
@b<package> Office.Employees @b<is>
@b<type> Employee @b<is private>;
@b<function> Dept_Of(Emp : Employee) @b<return access> Departments.Department;
@b<procedure> Assign_Dept(Emp : @b<in out> Employee;
Dept : @b<access> Departments.Department);
+
...
-@b<private
- type> Employee @b<is
- record>
+@b<private>
+ @b<type> Employee @b<is>
+ @b<record>
Dept : @b<access> Departments.Department;
Loc : Locations.Location;
...
@@ -557,9 +737,9 @@
@b<end> Office.Departments;>
The @fa<limited_with_clause> may be used to support mutually dependent
-abstractions that are split across multiple packages. In this
+abstractions that are split across multiple packages. In this
case, an employee is assigned to a department, and a department has
-a manager who is an employee. If a @fa<with_clause> with the reserved
+a manager who is an employee. If a @fa<with_clause> with the reserved
word @b<private> appears on one library unit and mentions a second
library unit, it provides visibility to the second library unit, but
restricts that visibility to the private part and body of the first
@@ -570,27 +750,31 @@
!corrigendum 11.3(6)
@drepl
-@xcode<@b<raise> Ada.IO_Exceptions.Name_Error; @ft<@i<-- see A.13>>>
+@xcode<@b<raise> Ada.IO_Exceptions.Name_Error; --@ft<@i< see A.13>>>
@dby
-@xcode<@b<raise> Ada.IO_Exceptions.Name_Error; @ft<@i<-- see A.13>>
-@b<raise> Queue_Error @b<with> "Buffer Full"; @ft<@i<-- see 9.11>>>
+@xcode<@b<raise> Ada.IO_Exceptions.Name_Error; --@ft<@i< see A.13>>
+@b<raise> Queue_Error @b<with> "Buffer Full"; --@ft<@i< see 9.11>>>
-!corrigendum 12.5.5(5)
+!corrigendum 12.5.5(1)
+!Comment This is a new clause, so this a dummy and the real thing is in the
+!comment conflicts.
@dinsa
-The actual type shall be a limited, task, protected, or synchronized interface if and only if the formal type is also, respectively, a limited, task, protected, or synchronized interface.
+The actual type shall be a limited, task, protected, or synchronized interface
+if and only if the formal type is also, respectively, a limited, task,
+protected, or synchronized interface.
@dinss
-@i<@s8<Example>>
+@i<@s8<Examples>>
-@xcode<@b<generic
- type> Managed_Task @b<is task interface>;
+@xcode<@b<generic>
+ @b<type> Managed_Task @b<is task interface>;
@b<type> Work_Item(<@>) @b<is new> Root_Work_Item @b<with private>;
-@b<package> Server_Manager @b<is
- task type> Server @b<is new> Managed_Task @b<with
- entry> Start(Data : @b<access> Work_Item);
+@b<package> Server_Manager @b<is>
+ @b<task type> Server @b<is new> Managed_Task @b<with>
+ @b<entry> Start(Data : @b<access> Work_Item);
@b<end> Server;
@b<end> Server_Manager;>
@@ -599,22 +783,47 @@
by an application-specific scheduler.
+!corrigendum 11.4.3(6)
+
+@drepl
+@xcode<@b<package body> File_System @b<is>
+ @b<procedure> Open(F : @b<in out> File_Handle; Name : String) @b<is>
+ @b<begin>
+ @b<if> File_Exists(Name) @b<then>
+ ...
+ @b<else>
+ Exceptions.Raise_Exception(File_Not_Found'Identity,
+ "File not found: " & Name & ".");
+ @b<end if>;
+ @b<end> Open;>
+@dby
+@xcode<@b<package body> File_System @b<is>
+ @b<procedure> Open(F : @b<in out> File_Handle; Name : String) @b<is>
+ @b<begin>
+ @b<if> File_Exists(Name) @b<then>
+ ...
+ @b<else>
+ @b<raise> File_Not_Found @b<with> "File not found: " & Name & ".";
+ @b<end if>;
+ @b<end> Open;>
+
+
!corrigendum 12.6(18)
@drepl
-@xcode<@b<with function> "+"(X, Y : Item) @b<return> Item @b<is> <@>;
-@b<with function> Image(X : Enum) @b<return> String @b<is> Enum'Image;
-@b<with procedure> Update @b<is> Default_Update;>
+@xcode<@b<with> @b<function> "+"(X, Y : Item) @b<return> Item @b<is> <@>;
+@b<with> @b<function> Image(X : Enum) @b<return> String @b<is> Enum'Image;
+@b<with> @b<procedure> Update @b<is> Default_Update;>
@dby
@xcode<@b<with function> "+"(X, Y : Item) @b<return> Item @b<is> <@>;
-@b<with function> Image(X : Enum) @b<return> String @b<is> Enum'Image;
-@b<with procedure> Update @b<is> Default_Update;
-@b<with procedure> Pre_Action(X : in Item) @b<is null>; @ft<@i<-- defaults to no action>>
-@b<with procedure> Write(S : @b<access> Root_Stream_Type'Class;
+@b<with> @b<function> Image(X : Enum) @b<return> String @b<is> Enum'Image;
+@b<with> @b<procedure> Update @b<is> Default_Update;
+@b<with> @b<procedure> Pre_Action(X : @b<in> Item) @b<is null>; --@ft<@i< defaults to no action>>
+@b<with> @b<procedure> Write(S : @b<access> Root_Stream_Type'Class;
Desc : Descriptor)
- @b<is abstract> Descriptor'Write; @ft<@i<-- see 13.13.2>>
-@ft<@i<-- Dispatching operation on Descriptor with default>>>
+ @b<is abstract> Descriptor'Write; --@ft<@i< see 13.13.2>>
+--@ft<@i< Dispatching operation on Descriptor with default>>>
!corrigendum 12.7(11)
@@ -631,13 +840,13 @@
@i<Example of generic package with formal package parameters:>
-@xcode<@b<generic
- with package> Mapping_1 @b<is new> Generic_Mapping(<@>);
+@xcode<@b<generic>
+ @b<with package> Mapping_1 @b<is new> Generic_Mapping(<@>);
@b<with package> Mapping_2 @b<is new> Generic_Mapping
(Key_Type =@> Mapping_1.Element_Type,
@b<others> =@> <@>);
@b<package> Generic_Join @b<is>
- @ft<@i<-- Provide a "join" between two mappings>>
+ --@ft<@i< Provide a "join" between two mappings>>
@b<subtype> Key_Type @b<is> Mapping_1.Key_Type;
@b<subtype> Element_Type @b<is> Mapping_2.Element_Type;
Questions? Ask the ACAA Technical Agent