Version 1.2 of ais/ai-00029.txt

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

!standard G.1.3 (12)          99-08-13 AI95-00029/02
!class binding interpretation 95-06-25
!status Corrigendum 2000 99-08-13
!status WG9 approved 95-06-14
!status ARG approved 9-0-1 95-11-01
!status received 95-06-25
!subject Does Complex_IO handle extended real literals?
!summary
The syntax of real literals read by Ada.Text_IO.Complex_IO.Get is the same as that of Ada.Text_IO.Float_IO.Get.
!question
G.1.3(12) says that Complex_IO.Get reads a pair of optionally signed real literals. This is inconsistent with A.10.9(13..18), which allows certain extended forms of real literals in Float_IO.Get. Should Complex_IO.Get allow the same extended forms? (Yes.)
!recommendation
The syntax of real literals read by Ada.Text_IO.Complex_IO.Get is the same as that of Ada.Text_IO.Float_IO.Get. The same applies to Ada.Wide_Text_IO.Complex_IO.Get.
!wording
(See corrigendum.)
!discussion
The intent is that all input of real literals, as well as the 'Value attribute, accept the same syntax. This intent is reflected in G.1.3(1.a), which suggests implementing Complex_IO in terms of Float_IO.
!corrigendum G.01.03(12)
Replace the paragraph:
The input sequence is a pair of optionally signed real literals representing the real and imaginary components of a complex value; optionally, the pair of components may be separated by a comma and/or surrounded by a pair of parentheses. Blanks are freely allowed before each of the components and before the parentheses and comma, if either is used. If the value of the parameter Width is zero, then
by:
The input sequence is a pair of optionally signed real values representing the real and imaginary components of a complex value. These components are each read as if they were real numbers read by an instance of Ada.Text_IO.Float_IO (see A.10.9). The pair of components may be separated by a comma and/or surrounded by a pair of parentheses. Blanks are freely allowed before each of the components and before the parentheses and comma, if either is used. If the value of the parameter Width is zero, then
!ACATS test
A C-Test should be created to check that the extended literal format is supported.
!appendix

!section G.1.3(12)
!section G.1.3(1)
!subject Does Complex_IO handle extended real literals?
!reference RM9X-G.1.3(12);5.95
!reference AARM-G.1.3(1.a);5.95
!from Norman Cohen
!reference as: 95-5088.e Norman H. Cohen 95-1-30>>
!discussion

G.1.3(12) says that, for versions of Get provided by instances of
Complex_IO, "The input sequence is a pair of optionally signed real
literals."  The Implementation Note in G.1.3(1.a) suggests that the
actual intent is to allow any of the forms of EXTENDED real literals
allowed by instances of Float_IO, described in A.10.9(13 .. 18).

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

Questions? Ask the ACAA Technical Agent