comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Too detailed public view of POSIX.IO.File_Descriptor in Florist?
Date: Sun, 14 Oct 2007 20:55:11 +0200
Date: 2007-10-14T20:55:11+02:00	[thread overview]
Message-ID: <ygeodf1h6gg.fsf@hugsarin.dmusyd.edu> (raw)
In-Reply-To: 4711fb9e$0$7203$4d3efbfe@news.sover.net

Peter C. Chapin wrote:

> Thus, in C,
>
> 	close(0);
> 	open("some/file.txt", O_RDONLY);

Or in Ada:

   Close (Standard_Input);
   File := Open ("some/file.txt", Read_Only);

> Now when the program reads its standard input it actually gets
> some/file.txt.

Yes.

I have never actually used the semantics of Open this way.  If I want
to transfer a file to one of the predefined file descriptors, I tend
to use Duplicate_and_Close, but I can see your point.

Greetings,

Jacob
-- 
"No!  The universe is ours."



      reply	other threads:[~2007-10-14 18:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14  5:05 Too detailed public view of POSIX.IO.File_Descriptor in Florist? Jacob Sparre Andersen
2007-10-14 11:21 ` Peter C. Chapin
2007-10-14 18:55   ` Jacob Sparre Andersen [this message]
replies disabled

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