From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!tl-20b.arpa!Evans From: Evans@TL-20B.ARPA ("Art Evans") Newsgroups: net.lang.ada Subject: Re: text_io considered error prone? Message-ID: <8509110230.AA06329@UCB-VAX.ARPA> Date: Tue, 10-Sep-85 22:34:22 EDT Article-I.D.: UCB-VAX.8509110230.AA06329 Posted: Tue Sep 10 22:34:22 1985 Date-Received: Wed, 11-Sep-85 20:07:39 EDT References: Sender: daemon@ucbvax.ARPA Organization: The ARPA Internet List-Id: As I read Chapter 14, Bakin's challange is unfair. In 14.3(6) and (7), there is a careful definition of what Ada means by "text file". TEXT_IO provides for I/O from such a file, and for nothing else. The last sentence of (7) says The effect of input or output of control characters (other than horizontal tabulation) is not defined by the language. Thus it's not surprising that copying an arbitrary string of ASCII characters is beyond the capabilities of TEXT_IO. As for the three cases Bakin wants to test for, #2 and #3 refer to "an ASCII form feed". Since that's an ASCII control character, the sentence I just quoted makes it clear that it cannot be dealt with. I think Bakin's subject field for his message ("text_io considered error prone?") is unfair to Ada, as his message points out deficiencies in TEXT_IO but does not address the question of whether or not TEXT_IO is error prone. It's not surprising that TEXT_IO is "deficient", in the sense that there are things one might want to do with arbitrary files of ASCII characters that cannot be done with TEXT_IO. So what? TEXT_IO provides useful functionality for an important subset of all possible ASCII files, and I expect that expanding its capabilities would have unacceptable costs. Moreover, as Bakin points out, since Ada provides other ways to accomplish what is beyond TEXT_IO, there is no loss of functionality. As an additional point: When Bakin said he was concerned with an "arbitrary text file", I expected he would worry about bare CR or bare LF (one of those characters other than in the CR-LF sequence). But, that was before I reread 14.3. Such files are beyond many I/O systems. Art Evans/Tartan Labs -------