Version 1.2 of ais/ai-00039.txt

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

!standard B.3.1 (44)          99-06-25 AI95-00039/03
!class binding interpretation 95-06-25
!status Corrigendum 2000 99-05-24
!status WG9 approved 95-06-14
!status ARG approved 11-0-0 (by letter ballot) 96-06-05
!status ARG approved (subject to letter ballot) 9-0-1 95-11-01
!status received 95-06-25
!subject Effect of Update(Null_Ptr,...)
!summary
Interfaces.C.Update raises Dereference_Error if Item = Null_Ptr.
!question
Does Update raise Dereference_Error if Item = Null_Ptr? (Yes.)
!recommendation
Interfaces.C.Update raises Dereference_Error if Item = Null_Ptr.
!wording
(See corrigendum.)
!discussion
This seems like the only sensible semantics.
!corrigendum B.03.01(44)
Replace the paragraph:
This procedure updates the value pointed to by Item, starting at position Offset, using Chars as the data to be copied into the array. Overwriting the nul terminator, and skipping with the Offset past the nul terminator, are both prevented if Check is True, as follows:
by:
If Item = Null_Ptr, then Update propagates Dereference_Error. Otherwise, this procedure updates the value pointed to by Item, starting at position Offset, using Chars as the data to be copied into the array. Overwriting the nul terminator, and skipping with the Offset past the nul terminator, are both prevented if Check is True, as follows:
!ACATS test
A check for this should be added as a test case to CXB3012.A.
!appendix

!section B.3.1(44)
!subject Effect of Update(Null_Ptr,...)
!reference RM95-B.3.1(44)
!from Norman Cohen
!reference as: 95-5119.d Norman H. Cohen 95-4-7>>
!discussion

Does Update raise Dereference_Error if Item = Null_Ptr?

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

!section B.3.1(44)
!subject Effect of Update(Null_Ptr,...)
!reference RM95-B.3.1(44)
!reference 95-5119.d Norman Cohen 95-04-07
!from Tucker Taft 95-04-12
!reference as: 95-5127.d Tucker Taft 95-4-12>>
!discussion

> Does Update raise Dereference_Error if Item = Null_Ptr?

Presumably, to be consistent with Strlen and Value.
You could argue that the line "Let N = Strlen(Item)" in B.3.1(45)
implies that if Strlen propagates Dereference_Error, then so does
Update.  However, being a bit more explicit would help.

-Tuck

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

Questions? Ask the ACAA Technical Agent