CVS difference for ai12s/ai12-0340-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai12s/ai12-0340-1.txt

--- ai12s/ai12-0340-1.txt	2019/09/04 05:18:12	1.1
+++ ai12s/ai12-0340-1.txt	2019/10/30 06:13:35	1.2
@@ -1,4 +1,4 @@
-!standard A.4.12(0)                                  19-09-03  AI12-0340-1/01
+!standard A.4.12(0)                                  19-10-29  AI12-0340-1/01
 !standard 4.10(3.1/5)
 !standard A.10(3.2/5)
 !standard A.10(6/5)
@@ -139,8 +139,7 @@
           with Default_Initial_Condition =>
               Character_Count (Buffer_Type) = 0;
 
-       -- Non-abstract Overridings of each operation inherited from are 
-       -- declared here.
+       -- Nonabstract overridings of each inherited operation are declared here.
 
 
    end Ada.Strings.Text_Buffers.Unbounded;
@@ -153,8 +152,7 @@
           with Default_Initial_Condition =>
               Character_Count (Buffer_Type) = 0;
 
-       -- Non-abstract Overridings of each operation inherited from are 
-       -- declared here.
+       -- Nonabstract overridings of each inherited operation are declared here.
        -- For each of Put, Wide_Put, and Wide_Wide_Put,
        -- Pre => (if Character_Count (Buffer) + Item'Length > Buffer.Max_Characters
        --         then raise Constraint_Error),
@@ -174,7 +172,7 @@
 considered, so it is irrelevant what type of character (Character, 
 Wide_Character, or Wide_Wide_Character) was stored.
 
-New_Line stores New_Line_Count characters that represents a new line into a text 
+New_Line stores New_Line_Count characters that represent a new line into a text 
 buffer. End_of_Line returns True if the next characters to be retrieved from the
 text buffer represent a new line.
 
@@ -184,18 +182,20 @@
 A call to Get, Wide_Get, or Wide_Wide_Get returns the same sequence of 
 characters as was present in the calls that stored the characters into the buffer.
 For a call to Get, if any character in the sequence is not defined in Character, 
-the result is implementation-defined. Similarly, for a call to Wide_Get, if the 
+the result is implementation-defined. Similarly, for a call to Wide_Get, if
 any character in the sequence is not defined in Wide_Character, the result is 
 implementation-defined. 
 
-[Author's note: The postcondition on these routines does not allow the length to
-be different from that of the sequence of characters. That's different than the
-current definition of Image and Wide_Image. Is that a problem? If so, we'll have
-to weaken the postcondition (to allow longer results than the number of characters
-returned) and add some more English to require the length of result to equal the
-characters read if all characters in the sequence are in the appropriate type. Or 
-I suppose we could add a pair of queries to that effect.]
+AARM Ramification: Even when the result is implementation-defined, the 
+postconditions on the various Get routines require the length of the returned 
+string to match that of the number of characters removed from the buffer.
 
+Implementation Advice
+
+Bounded buffer objects should be implemented without dynamic allocation. 
+
+
+
 =========================
 
 Replace 4.10(3-3.2/5) with:
@@ -239,7 +239,7 @@
 
 Replace 4.10(31/5) with:
 
-   Wide_Image calls S'Put_Image passing Arg (which will typically store
+   Image calls S'Put_Image passing Arg (which will typically store
    a sequence of character values out in a text buffer) and then returns the 
    result of retrieving the contents of that buffer with Get. The 
    lower bound of the result is 1.
@@ -340,6 +340,22 @@
 keep that to a minimum here. If there is enough interest in these operations,
 we certainly can do that.] 
 
+----
+
+The implementation-definedness of converting a character to a type that does
+not support that glyph is moved to the buffers. We imagine using these routines
+to define other such conversions to avoid spreading the rules all over the 
+Standard.
+
+One minor incompatibility with the previous Ada definition: the postconditions
+on the Get routines require the lengths of the returned strings to match the
+length of the Putted item(s). That means that only a single character can be
+used to represent unknown characters.
+
+We could have used more complex postcondition with additional query to ensure that
+the lengths match if all characters are in the output characters and the length
+is the same or longer otherwise. That doesn't seem necessary for existing
+implementations, so we didn't add the complication.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent