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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d93b7c6dd17cbc81 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Strings and reading from a file Date: 1999/05/15 Message-ID: #1/1 X-Deja-AN: 478145979 Content-Transfer-Encoding: 7bit References: <7han2q$jkp$1@news.iinet.net.au> <37399913.BD928DD1@pwfl.com> <7hevh1$g08$1@nnrp1.deja.com> <7hf2bc$imm$1@nnrp1.deja.com> <7hf611$16i$1@cnn.Princeton.EDU> <373B93FC.9E89E2C2@Botton.com> <7hgvsb$fgj$1@wanadoo.fr> <7hi7nm$fsk@hobbes.crc.com> X-Priority: 3 Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-MSMail-Priority: Normal MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-15T00:00:00+00:00 List-Id: Keith Thompson wrote in message news:yecyairi5mm.fsf@king.cts.com... > I wrote: > > > Shouldn't the default for File be Ada.Text_IO.Current_Input rather > > > than Ada.Text_IO.Standard_Input? (Not that I've ever understood the > > > need for the distinction, but we might as well be consistent.) > > "David C. Hoos, Sr." replied: > > Current_Input is switchable from file to file by a running program, > > whereas Standard_Input is fixed from the program's perspective. > > I know what it does, but I question the wisdom of having it in the > standard. I don't think I've ever seen a call to Set_Input or > Set_Output outside a test program. > > Yes, it can be handy to have a quick and dirty way to redirect default > input and output within a program, but I'd much rather use another > File_Type object or parameter than mess around with the global state > of Ada.Text_IO. After all, that's why there are versions of Put_Line, > Get_Line, etc. that take File_Type parameters. > Well, I saw it used quite a lot one program, and it brought to light that there was an error in the compiler vendor's implementation of Text_IO; We made a fix to the implementation, and submitted it to the vendor, who rejected our solution because of some AI (I don't remember the number). After four years of waiting, I gave up on the vendor ever fixing it. I'm no longer on that program, but I think they're still using my "workaround."