From: dennison@telepath.com
Subject: Re: What good are File_Access's?
Date: 1998/07/20
Date: 1998-07-20T00:00:00+00:00 [thread overview]
Message-ID: <6ovjqp$ki8$1@nnrp1.dejanews.com> (raw)
In-Reply-To: dewar.900786542@merv
In article <dewar.900786542@merv>,
dewar@merv.cs.nyu.edu (Robert Dewar) wrote:
> T.E.D. said
>
> >It looks to me like the whole point of the File_Access type in Ada.Text_IO is
> >to allow Standard_Output and Current_Output (and the same functions for Input
> >and Error) to be compared in order to see if I/O has been redirected somehow.
> No, the point of this feature is to allow you to save and restore the
> value of Current_Output. Ted's theory is interesting, but there is nothing
> in the RM to suggest that this equality test is expected to work, let alone
> required to work!
Ahhhh. That's the answer I was looking for.
I didn't consider that as a possibility because that method of saving off the
Current_Output won't work in a multi-tasking environment. You'd need some kind
of "atomic" save-and-change operation. Since that is %90 of the Ada programs I
have ever worked on, that doesn't make it too useful.
It does look like it might have some application for streams too...
> Indeed it is easy to imagine that two values designating the same file
> would very likely not be equal.
Apparently not. (sigh) Oh well. On to Plan B.
T.E.D.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
next prev parent reply other threads:[~1998-07-20 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-17 0:00 What good are File_Access's? dennison
1998-07-17 0:00 ` Tucker Taft
1998-07-18 0:00 ` Robert Dewar
1998-07-20 0:00 ` dennison [this message]
1998-07-20 0:00 ` Robert Dewar
1998-07-20 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