Version 1.4 of ai12s/ai12-0452-1.txt
!standard 3.9.3(16/5) 22-12-02 AI12-0452-1/01
!standard 4.1.1(10)
!standard 5.2(28)
!standard 7.3.1(18)
!standard 7.5(21/5)
!standard 13.3(85)
!standard 13.5.1(31)
!standard A.5.2(61)
!standard E.4.2(7)
!class presentation 22-12-02
!status Amendment 1-2012 22-12-02
!status ARG Approved 13-0-0 23-01-19
!status work item 22-12-02
!status received 22-11-04
!priority Low
!difficulty Easy
!subject Notes on examples is not a thing
!summary
Notes labeled "notes on examples" are moved to be part of the appropriate
example.
!question
There are several notes that have an italized prefix like "notes on the
examples". ISO does not allow this prefix. Should this be changed
somehow? (Yes.)
!recommendation
(See Summary.)
!wording
Modify 3.9.3(16/5):
[NOTE 3 Notes on the Example: ]Given the above abstract type, one can derive
various (nonabstract) extensions of the type, representing alternative
implementations of a set. One possibility is to use a bit vector, but impose
an upper bound on the largest element representable, while another possible
implementation is a hash table, trading off space for flexibility.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. This will require deleting and re-inserting the paragraph,
but since this is a non-normative paragraph the number can remain the same
when that is done. Note that this paragraph was previously rewritten to
eliminate "could" and "might".]
Modify 4.1.1(10):
[NOTE Notes on the Examples: ]Distinct notations are used for components of
multidimensional arrays (such as Board) and arrays of arrays (such as Page).
The components of an array of arrays are arrays and can therefore be indexed.
Thus Page(10)(20) denotes the 20th component of Page(10). In the last example
Next_Frame(L) is a function call returning an access value that designates a
two-dimensional array.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. See the note after 3.9.3(16/5) for more.]
Modify 5.2(28):
[NOTE 2 Notes on the examples: ]Assignment_statements are [allowed]{well-defined} even in
the case of overlapping slices of the same array, because the variable_name
and expression are both evaluated before copying the value into the variable.
In the above example, an implementation yielding A(1 .. 12) = "tartartartar"
would be incorrect.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. See the note after 3.9.3(16/5) for more. Note that
"are allowed" is not allowed ISO wording; but this never was the right
wording for this topic -- the issue is that they work as expected
even in these cases, it is not one of legality (nor could it be).
I replaced this with "well-defined" at Tucker's suggestion, but that
doesn't seem quite right, either. "work as defined" is more accurate,
but also awkward. Better ideas are welcome.]
Modify 7.3.1(18):
[NOTE 4 Notes on the example: ]Outside of the package Key_Manager, the
operations available for objects of type Key include assignment, the
comparison for equality or inequality, the procedure Get_Key and the
operator "<"; they do not include other relational operators such as ">=",
or arithmetic operators.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. The following two paragraphs 7.3.1(19) and 7.3.1(20)
will also be deleted and reinserted. See the note after 3.9.3(16/5) for
more.]
Modify 7.5(21/5):
[NOTE 3 Notes on the example: ]In the example[ above], an outside subprogram
making use of IO_Package can obtain a file name by calling Open and later
use it in calls to Read and Write. Thus, outside the package, a file name
obtained from Open acts as a kind of password; its internal properties (such
as containing a numeric value) are not known and no other operations (such as
addition or comparison of internal names) can be performed on a file name. Most
importantly, clients of the package cannot make copies of objects of type
File_Name.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. The following two paragraphs 7.5(22) and 7.5(23/2)
will also be deleted and reinserted. I removed "above" as this is now
part of the example, so it is just noise. See the note after 3.9.3(16/5) for
more.]
Modify 13.3(85):
[NOTE 11 Notes on the examples: ]In the Size clause for Short, fifteen bits
is the minimum necessary, since the type definition {implies}[requires]
Short'Small <= 2**(–7).
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. See the note after 3.9.3(16/5) for more. "Requires" is
a word that should not appear in notes or examples.]
Modify 13.5.1(31):
[NOTE 2 Note on the example: ]The record_representation_clause defines the
record layout. The Size clause guarantees that (at least) eight storage
elements are used for objects of the type. The Alignment clause guarantees
that aliased, imported, or exported objects of the type will have addresses
divisible by eight.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. See the note after 3.9.3(16/5) for more.]
Modify A.5.2(61):
[NOTE 4 Notes on the last example: ]Although each Worker task initializes
its generator to a different state, those states will be the same in every
execution of the program. The generator states can be initialized uniquely
in each program execution by instantiating Ada.Numerics.Discrete_Random for
the type Integer in the main procedure, resetting the generator obtained
from that instance to a time-dependent state, and then using random integers
obtained from that generator to initialize the generators in each Worker task.
[Editor's note: This will no longer be a note, but rather a part of the
preceding example. See the note after 3.9.3(16/5) for more.]
Modify E.4.2(7):
[Notes on]{Discussion of} the example:
[Editor's note: ISO wants anything that uses the word "note" to be a note, so
we have to say something else here. This leads in a set of bullets, so we
can't just delete it. Ideally, we'd rewrite this into a set of narrative
paragraphs that don't need any lead-in, but that seems like too much work
(especially for an Annex that is rarely supported).]
!discussion
These "notes" are usually text discussion of the previous example, and thus
are part of that example. They should be included as part of the example and
not formatted as a note.
We find this form mostly associated with original Ada 95 examples; newer
examples just include the text under the Examples heading.
!ASIS
No ASIS effect.
!ACATS test
This is just changing notes and examples, so there is nothing normative being
changed, and thus no tests needed.
!appendix
****************************************************************
Questions? Ask the ACAA Technical Agent