From: randhol+abuse@pvv.org (Preben Randhol)
Subject: Re: GNAT bug or expectations problem with Text_Io.Text_Streams
Date: 2000/09/24
Date: 2000-09-24T13:02:51+00:00 [thread overview]
Message-ID: <slrn8srur4.hi.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: zSkz5.18980$ks.783347@newsread1.prod.itd.earthlink.net
On Sun, 24 Sep 2000 10:40:31 GMT, David C. Hoos, Sr. wrote:
>That said, the observed behavior seems to me to violate RM A 12.2 (34),
>viz.:
>"The ability to obtain a stream for a text file allows Current_Input,
>Current_Output, and Current_Error to be processed with the functionality
>of streams, including the mixing of text and binary input-output, and the
>mixing of binary input-output for different types."
After looking in the Gnat 3.13p source code I found this:
a-textio.adb:
-- This is the primitive Stream Write routine, used when a
-- Text_IO file is treated directly as a stream using
-- Text_IO.Streams.Stream.
procedure Write
[...]
-- Now we do the write. Since this is a text file, it is normally in
-- text mode, but stream data must be written in binary mode, so we
-- temporarily set binary mode for the write, resetting it after.
-- These calls have no effect in a system (like Unix) where there is
-- no distinction between text and binary files.
set_binary_mode (fileno (File.Stream));
i-cstrea.ads: procedure set_binary_mode (handle : int);
i-cstrea.ads: pragma Import (C, set_binary_mode, "set_binary_mode");
--
Preben Randhol - Ph.D student - http://www.pvv.org/~randhol/
"i too once thought that when proved wrong that i lost somehow"
- i was hoping, alanis morisette
next prev parent reply other threads:[~2000-09-24 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-23 0:00 GNAT bug or expectations problem with Text_Io.Text_Streams Jeff Creem
2000-09-24 0:00 ` David C. Hoos, Sr.
2000-09-24 0:00 ` Preben Randhol [this message]
2000-09-24 0:00 ` Preben Randhol
2000-09-24 0:00 ` Preben Randhol
2000-09-24 0:00 ` David C. Hoos, Sr.
2000-09-24 0:00 ` Preben Randhol
2000-09-24 2:23 ` Ted Dennison
2000-09-24 0:00 ` Jeff Creem
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox