Version 1.2 of ais/ai-00223.txt

Unformatted version of ais/ai-00223.txt version 1.2
Other versions for file ais/ai-00223.txt

!standard A.10.6 (05)          00-04-12 AI95-00223/02
!standard 13.7 (35)
!class binding interpretation 99-08-16
!status ARG Approved 5-0-2 00-03-31
!status work item 99-08-16
!status received 99-08-16
!priority Low
!difficulty Easy
!subject Line terminators are skipped by Get.
!summary
Leading line and page terminators are skipped by Ada.Text_IO.Get for enumeration types and other types defined in terms of it.
!question
A.10.6(5) first says "Any Get procedure for an enumeration type begins by skipping any leading blanks, or line or page terminators." It then goes on to say "Get procedures for numeric or enumeration type start by skipping blanks, where a blank is defined to be a space or horizontal tabulation character."
These sentences conflict as to whether line or page terminators are skipped. Are the terminators skipped? (Yes.)
!recommendation
(See summary.)
!wording
In A.10.6(5), Replace
Get procedures for numeric or enumeration types start by skipping leading blanks, where a @i<blank> is defined as a space or a horizontal tabulation character.
by:
A @i<blank> is defined as a space or a horizontal tabulation character.
!discussion
Ada 83 required the skipping of line and page terminators. Clearly, given two choices, the choice which maintains compatibility with Ada 83 is to be preferred. In addition, the second of the two sentences just says too much; it appears only to be intended to define blank.
!ACATS test
Many ACATS tests check for this skipping. For enumeration types, for instance, CE3904B.Ada checks this.
!corrigendum A.10.06(05)
Replace:
Input-output of enumeration values uses the syntax of the corresponding lexical elements. Any Get procedure for an enumeration type begins by skipping any leading blanks, or line or page terminators. Get procedures for numeric or enumeration types start by skipping leading blanks, where a blank is defined as a space or a horizontal tabulation character. Next, characters are input only so long as the sequence input is an initial sequence of an identifier or of a character literal (in particular, input ceases when a line terminator is encountered). The character or line terminator that causes input to cease remains available for subsequent input.
by:
Input-output of enumeration values uses the syntax of the corresponding lexical elements. Any Get procedure for an enumeration type begins by skipping any leading blanks, or line or page terminators. A blank is defined as a space or a horizontal tabulation character. Next, characters are input only so long as the sequence input is an initial sequence of an identifier or of a character literal (in particular, input ceases when a line terminator is encountered). The character or line terminator that causes input to cease remains available for subsequent input.
!appendix

From: Randy Brukardt
Sent: Monday, August 16, 1999 11:10 AM

Am I seeing things? A.10.6(5) says first: "Any Get procedure for an
enumeration type begins by skipping any leading blanks, or line or page
terminators." It then goes on to say "Get procedures for numeric or
enumeration type start by skipping blanks, where a blank is defined to be a
space or horizontal tabulation character."

These two sentences seem to conflict. Obviously, the first sentence is
correct, and the second is supposed to just be defining the meaning of
"leading blank", but it says too much. Do we need an AI here???

*************************************************************

From: Tucker Taft
Sent: Monday, August 16, 1999 11:40 AM

Weird.  This looks like a gratuitous wording change from Ada 83,
which then got goofed up.  In Ada 83, just the definition of "blank" is
appended to the first sentence with a semicolon.  In Ada 95, somebody
felt the need to create a separate sentence, and got it totally wrong.
Oh well...  Yes, I suppose an AI is needed.

*************************************************************

Questions? Ask the ACAA Technical Agent