comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: Strings and reading from a file
Date: 1999/05/14
Date: 1999-05-14T23:38:41+00:00	[thread overview]
Message-ID: <yecyairi5mm.fsf@king.cts.com> (raw)
In-Reply-To: 7hi7nm$fsk@hobbes.crc.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." <david.c.hoos.sr@ada95.com> 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  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center  <http://www.sdsc.edu>                 <*>
Techno-geek.  Mouse bigger than phone.  Bites heads off virtual chickens.




  reply	other threads:[~1999-05-14  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-12  0:00 Strings and reading from a file Cameron Hodge
1999-05-11  0:00 ` David Botton
1999-05-12  0:00 ` Gautier
1999-05-12  0:00 ` Robert Dewar
1999-05-12  0:00   ` Cameron Hodge
1999-05-12  0:00     ` Marin David Condic
1999-05-12  0:00       ` Tom Moran
1999-05-12  0:00         ` Marin David Condic
1999-05-13  0:00       ` jrcarter001
1999-05-13  0:00         ` dennison
1999-05-13  0:00           ` Martin C. Carlisle
1999-05-13  0:00             ` David Botton
1999-05-13  0:00               ` David Botton
1999-05-14  0:00               ` Jean-Pierre Rosen
1999-05-14  0:00                 ` Keith Thompson
1999-05-14  0:00                   ` David C. Hoos, Sr.
1999-05-14  0:00                     ` Keith Thompson [this message]
1999-05-15  0:00                       ` David C. Hoos, Sr.
1999-05-16  0:00                   ` Jean-Pierre Rosen
1999-05-13  0:00             ` Marin David Condic
1999-05-13  0:00               ` Hyman Rosen
1999-05-13  0:00               ` Keith Thompson
1999-05-14  0:00                 ` Pascal Obry
1999-05-15  0:00             ` jrcarter001
1999-06-05  0:00               ` Matthew Heaney
1999-05-12  0:00     ` David C. Hoos, Sr.
1999-05-12  0:00   ` dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox