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: Keith Thompson Subject: Re: Strings and reading from a file Date: 1999/05/14 Message-ID: #1/1 X-Deja-AN: 477995057 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-Complaints-To: usenet@nusku.cts.com X-Trace: nusku.cts.com 926725121 12812 198.68.168.21 (14 May 1999 23:38:41 GMT) Organization: CTS Network Services NNTP-Posting-Date: 14 May 1999 23:38:41 GMT Newsgroups: comp.lang.ada Date: 1999-05-14T23:38:41+00:00 List-Id: 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. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Techno-geek. Mouse bigger than phone. Bites heads off virtual chickens.