CVS difference for ai05s/ai05-0185-1.txt
--- ai05s/ai05-0185-1.txt 2010/11/25 02:46:32 1.5
+++ ai05s/ai05-0185-1.txt 2011/04/26 21:38:55 1.6
@@ -1,4 +1,4 @@
-!standard A.3.5 (0) 10-11-23 AI05-0185-1/04
+!standard A.3.5 (0) 11-04-26 AI05-0185-1/05
!standard A.3.6 (0)
!standard A.3.1(7/2)
!standard A.3.2(4)
@@ -52,7 +52,7 @@
and sorting, etc.) it should do so by providing child units of Wide_Characters.
Similarly if it chooses to provide implementation-defined operations on
Wide_Wide_Character or Wide_Wide_String it should do so by providing child units
-of Wide_Wide_Characters.
+of Wide_Wide_Characters.
Add to the end of A.3.2(4):
@@ -65,7 +65,8 @@
Add following A.3.2(32)
Is_Line_Terminator
-True if Item is a character with position 10 .. 13.
+True if Item is a character with position 10 .. 13 (Line_Feed, Line_Tabulation,
+Form_Feed, Carriage_Return) or 133 (Next_Line).
Is_Mark
Never True (no value of type Character has categories Mark, Non-Spacing
@@ -184,7 +185,8 @@
Returns True if the Wide_Character designated by Item is categorized as
separator_line or separator_paragraph, or if Item is a conventional line
- terminator character (CR, LF, VT, or FF); otherwise returns False.
+ terminator character (Line_Feed, Line_Tabulation,
+ Form_Feed, Carriage_Return, Next_Line); otherwise returns False.
function Is_Mark (Item : Wide_Character) return Boolean;
@@ -300,14 +302,14 @@
and sorting, etc.) it should do so by providing child units of Wide_Characters.
Similarly if it chooses to provide implementation-defined operations on
Wide_Wide_Character or Wide_Wide_String it should do so by providing child units
-of Wide_Wide_Characters.
+of Wide_Wide_Characters.
@dby
If an implementation chooses to provide implementation-defined operations on
Wide_Character or Wide_String (such as collating
and sorting, etc.) it should do so by providing child units of Wide_Characters.
Similarly if it chooses to provide implementation-defined operations on
Wide_Wide_Character or Wide_Wide_String it should do so by providing child units
-of Wide_Wide_Characters.
+of Wide_Wide_Characters.
!corrigendum A.3.2(4)
@@ -352,7 +354,8 @@
@dinss
@xhang<@xterm<Is_Line_Terminator>
Is_Line_Terminator
-True if Item is a character with position 10 .. 13.>
+True if Item is a character with position 10 .. 13 (Line_Feed, Line_Tabulation,
+Form_Feed, Carriage_Return) or 133 (Next_Line).>
@xhang<@xterm<Is_Mark>
Never True (no value of type Character has categories Mark, Non-Spacing
@@ -474,7 +477,8 @@
@xindent<Returns True if the Wide_Character designated by Item is categorized as
@fa<separator_line> or @fa<separator_paragraph>, or if Item is a conventional
-line terminator character (CR, LF, VT, or FF); otherwise returns False.>
+line terminator character (Line_Feed, Line_Tabulation, Form_Feed,
+Carriage_Return, Next_Line); otherwise returns False.>
@xcode<@b<function> Is_Mark (Item : Wide_Character) @b<return> Boolean;>
@@ -513,7 +517,7 @@
@xindent<Returns the result of applying the To_Lower Wide_Character to
Wide_Character conversion to each element of the Wide_String designated by Item.
The result is the null Wide_String if the value of the formal parameter is the
-null Wide_String. The lower bound of the result Wide_String is 1.>
+null Wide_String. The lower bound of the result Wide_String is 1.>
@xcode<@b<function> To_Upper (Item : Wide_Character) @b<return> Wide_Character;>
@@ -828,5 +832,72 @@
case folding -- but *that* is a conversion to *lower* case! See AI05-0227-1.
So we need to decide what we really want here.
+
+****************************************************************
+
+!topic Inconsistency in meaning of line terminator
+!reference Ada 2012 RM (Draft 11) 2.1(13/2), 2.2(2/2), A.3.2(32.1/3), A.3.5(40/3)
+!from Howard W. Ludwig 11-04-18
+!discussion
+
+Paragraph 2.1(13/2) explicitly includes 16#85# (NEXT LINE) character as a format
+effector.
+
+Paragraph 2.2(2/2) states that a sequence of one or more format effectors except
+for CHARACTER TABULATIONs signifies at least one end of line. Therefore, from
+2.1(13/2) I infer that the presence of a NEXT LINE character, which is not a
+CHARACTER TABULATION, would signify at least one end of line and constitute a
+line terminator.
+
+Paragraph A.3.2(32.1/3) implies that the function Is_Line_Terminator would not
+return True if Item is a character is the NEXT LINE character, with position 133
+(16#85#), which is in the position range of type Character (unlike
+separator_line and separator_paragraph, which are appropriately excluded in this
+paragraph). Paragraph A.3.5(40/3) also inappropriately excludes NEXT LINE
+characters in a Wide_Character context.
+
+Otherwise, NEXT LINE needs to be removed from the format effector category in
+Paragraph 2.1(13/2), which would contradict Unicode and other current trends.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, April 19, 2011 12:27 AM
+
+Well, there is one additional possibility, which would be to leave NEXT LINE as
+a format_effector but exclude it from being the end of a line (treating it like
+CHARACTER TABULATION).
+
+But I think this is just a clear omission in A.3.2, since the Chapter 2 rules
+seem clear enough. I'll see if there is support for a change.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, April 19, 2011 12:33 AM
+
+There is a comment from Howard Ludwig on Ada-Comment saying that
+Is_Line_Terminator should return True for "Next Line" (Pos(16#85#)).
+
+His logic is that it is defined as a format_effector by 2.1(13/2);
+format_effectors other than TAB "signify end of line" according to 2.2(2/2). And
+everything that signifies an end of line is included in Is_Line_Terminator
+except "Next Line".
+
+Other fixes would include removing Next Line from the definition of
+format_effector (but that would vary from Unicode and 10646); or defining Next
+Line similarly to Tab (but why?).
+
+I think he is right, and it is a simple change at this point (these are new
+routines, so there is no compatibility concern).
+
+Thoughts?
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Tuesday, April 19, 2011 7:08 AM
+
+Given its name, it sounds like it makes sense to consider it a line terminator.
****************************************************************
Questions? Ask the ACAA Technical Agent