CVS difference for ai05s/ai05-0031-1.txt
--- ai05s/ai05-0031-1.txt 2010/02/16 03:02:06 1.4
+++ ai05s/ai05-0031-1.txt 2010/04/05 22:30:59 1.5
@@ -4,6 +4,8 @@
!standard A.4.4(51)
!standard A.4.5(46)
!class Amendment 06-11-03
+!status Amendment 2012 10-04-05
+!status ARG Approved 10-0-0 10-02-26
!status work item 06-11-03
!status received 06-11-03
!priority Low
@@ -52,12 +54,12 @@
First : out Positive;
Last : out Natural);
-If From is not in Source'Range, then Index_Error is raised. Otherwise,
-First is set to the index of the first character in Source(From..Source'Last)
-that satisfies the Test condition. Last is set to the largest index such that
-all characters in Source(First..Last) satisfy the Test condition. If no
-characters in Source(From..Source'Last) satisfy the Test condition, First
-is set to From, and Last is set to 0.
+If Source is not the null string and From is not in Source'Range, then Index_Error
+is raised. Otherwise, First is set to the index of the first character in
+Source(From..Source'Last) that satisfies the Test condition. Last is set to the
+largest index such that all characters in Source(First..Last) satisfy the Test
+condition. If no characters in Source(From..Source'Last) satisfy the Test condition,
+First is set to From, and Last is set to 0.
Replace A.4.3(68/1) by:
@@ -116,7 +118,101 @@
!example
+!corrigendum A.4.3(16)
+
+@dinsb
+@xcode<@b<procedure> Find_Token (Source : @b<in> String;
+ Set : @b<in> Maps.Character_Set;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+@dinst
+@xcode<@b<procedure> Find_Token (Source : @b<in> String;
+ Set : @b<in> Maps.Character_Set;
+ From : @b<in> Positive;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+
+
+!corrigendum A.4.3(67)
+
+@dinsb
+@xcode<@b<procedure> Find_Token (Source : @b<in> String;
+ Set : @b<in> Maps.Character_Set;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+
+@dinss
+@xcode<@b<procedure> Find_Token (Source : @b<in> String;
+ Set : @b<in> Maps.Character_Set;
+ From : @b<in> Positive;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+
+@xindent<If Source is not the null string and From is not in Source'Range,
+then Index_Error is raised. Otherwise, First is set to the index of the first
+character in Source(From..Source'Last) that satisfies the Test condition. Last
+is set to the largest index such that all characters in Source(First..Last) satisfy
+the Test condition. If no characters in Source(From..Source'Last) satisfy the Test
+condition, First is set to From, and Last is set to 0.>
+
+!corrigendum A.4.3(68)
+
+@drepl
+Find_Token returns in First and Last the indices of the beginning and end
+of the first slice of Source all of whose elements satisfy the Test condition,
+and such that the elements (if any) immediately before and after the slice do
+not satisfy the Test condition. If no such slice exists, then the value returned
+for Last is zero, and the value returned for First is Source'First; however, if
+Source'First is not in Positive then Constraint_Error is raised.
+@dby
+Equivalent to Find_Token (Source, Set, Source'First, Test, First, Last).
+
+AARM Ramification:
+If Source'First is not in Positive, which can only happen for an empty string,
+this will raise Constraint_Error.
+
+!corrigendum A.4.4(51);
+
+@dinsb
+@xcode<@b<procedure> Find_Token (Source : @b<in> Bounded_String;
+ Set : @b<in> Maps.Character_Set;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+@dinst
+@xcode<@b<procedure> Find_Token (Source : @b<in> Bounded_String;
+ Set : @b<in> Maps.Character_Set;
+ From : @b<in> Positive;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+
+!corrigendum A.4.5(46);
+
+@dinsb
+@xcode<@b<procedure> Find_Token (Source : @b<in> Unbounded_String;
+ Set : @b<in> Maps.Character_Set;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+@dinst
+@xcode<@b<procedure> Find_Token (Source : @b<in> Unbounded_String;
+ Set : @b<in> Maps.Character_Set;
+ From : @b<in> Positive;
+ Test : @b<in> Membership;
+ First : @b<out> Positive;
+ Last : @b<out> Natural);>
+
+
+
!ACATS test
+
+Add ACATS C-Tests for the new functions (for all of Ada.Strings.Fixed,
+Ada.Strings.Bounded, and Ada.Strings.Unbounded).
!appendix
Questions? Ask the ACAA Technical Agent