Version 1.3 of ais/ai-00142.txt

Unformatted version of ais/ai-00142.txt version 1.3
Other versions for file ais/ai-00142.txt

!standard B.3.2 (49)          99-08-31 AI95-00142/01
!class presentation 96-05-07
!status Corrigendum 2000 99-07-28
!status received 96-05-07
!qualifier Presentation
!subject Incorrect example for Interfaces.C.Pointers
!summary
The example in B.3.2(49) should be corrected to
exit when C."="(Element, C.nul);
!question
In the example, the usage of "=" in:
exit when Element = C.Nul;
is illegal because "=" is not visible for type C.Char.
!recommendation
(See summary.)
!wording
(See summary.)
!discussion
The example is wrong and should be corrected.
!corrigendum B.3.2(49)
Replace the paragraph:
loop Element := Source_Temp_Ptr.all; Target_Temp_Ptr.all := Element; exit when Element = C.nul; Char_Ptrs.Increment(Target_Temp_Ptr); Char_Ptrs.Increment(Source_Temp_Ptr); end loop; end Strcpy; begin ... end Test_Pointers;
by:
loop Element := Source_Temp_Ptr.all; Target_Temp_Ptr.all := Element; exit when C."="(Element, C.nul); Char_Ptrs.Increment(Target_Temp_Ptr); Char_Ptrs.Increment(Source_Temp_Ptr); end loop; end Strcpy; begin ... end Test_Pointers;
!ACATS test
None needed, existing tests check the visibility rules.
!appendix

!section B.3.2(49)
!subject Incorrect example for Interfaces.C.Pointers
!reference RM95 B.3.2(49)
!from Pascal Leroy 96-04-29
!reference 96-5528.e Pascal Leroy 96-4-29>>
!discussion

In the example, the usage of "=" in:

   exit when Element = C.Nul;

is illegal unless a use type clause is added for type C.Char.

_____________________________________________________________________
Pascal Leroy                                    +33.1.30.12.09.68
pleroy@rational.com                             +33.1.30.12.09.66 FAX

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

Questions? Ask the ACAA Technical Agent