AI22-0087-1
!standard A.4.12(31/5) 24-04-24 AI22-0087-1/04
!class binding interpretation 22-12-07
!status Amendment 1-2022 23-12-14
!status WG9 Approved 24-06-10
!status ARG Approved 10-0-1 23-12-14
!status work item 23-12-07
!status received 23-09-26
!submitter Tucker Taft
!priority Low
!difficulty Easy
!qualifier Omission
!subject Text buffers are initially empty
Text buffers are initially empty unless otherwise initialized. Remove wording mentioning Character_Count, since it is no longer defined in the package.
(1) Nothing in A.4.12 describes the initial state of a text buffer. A.4.12(34/5) says that a buffer is "reset to an empty state, with no stored characters" after a call to one of the Get functions, but nothing is said about the initial state.
(2) A.4.12(31/5) and an associated note talks about a Character_Count function, but no such thing is defined.
(See summary.)
Replace A.4.12(31/5) with:
If an object of a text buffer type is not otherwise initialized, it is initialized to the empty state, with no stored characters.
Delete AARM A.4.12(31.a/5).
It would have been better to have an Is_Empty function in the text buffers, and include that in the Default_Initial_Condition, but it seems unnecessarily disruptive to add a function to this package now for this rather trivial issue.
Note that the use of text buffers to implement the Image attribute combined with the requirements on the result of the Image attribute (particularly for compatibility reasons), mean that the buffers have to be empty on initialization. One could apply the Dewar Rule, but it is better to be explicit.
@drepl
Character_Count returns the number of characters currently stored in a text buffer.
@dby
If an object of a text buffer type is not otherwise initialized, it is initialized to the empty state, with no stored characters.
No additional ACATS test should be needed, any test of text buffers will assume an empty initial state.