comp.lang.ada
 help / color / mirror / Atom feed
From: sk <sknipe@ktc.com>
To: comp.lang.ada@ada.eu.org
Subject: Re: Unix text handling on stdin
Date: Fri, 24 Aug 2001 21:56:06 -0500
Date: 2001-08-24T21:56:06-05:00	[thread overview]
Message-ID: <mailman.998708397.2134.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 9m6hcj$aai1@news.cis.okstate.edu

Hi again,

I wrote:
>I fully intended to look up the issue in both the LRM and
>Ada Issues to see if the compiler was behaving according to
>spec, but once I found a work-around, I never got round
>to checking about the legitimacy of this TIO behaviour.

Firstly, I should have said text-io behaving according to spec,
and not "the compiler" ... and then I got around to actually
reading up on the issue.


From the Ada95 Reference Manual (Electronic, provided with GNAT 
.../gnat-3.13p-unx-docs/html/arm95.html#SEC247)

:Text File Management
:
:...
:
:2.For the procedure Close: If the file has the current mode 
:Out_File or Append_File, has the effect of calling New_Page,
:unless the current page is already terminated; then outputs
:a file terminator. 
:
:...
:

So, the behaviour of adding a file terminating byte in 
closing a file from Text_IO agrees with the ARM.

It also appears that Interfaces.C_Streams and Ada.Text_Io.C_Streams
are provided by GNAT. The packages do not seem to be documented
in the above mentioned electronic ARM; they are, however,
documented in the GNAT RM
(.../gnat-3.13p-unx-docs/html/gnat_rm.html#SEC42).

sknipe@ktc.com

PS The example makes no use of Ada.Streams and Ada.Streams.Stream_Io;
as I mentioned, it was a QUAD and therefore subject to not editing
out the unecessary items from a cut and paste job.



      parent reply	other threads:[~2001-08-25  2:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-24 21:36 Unix text handling on stdin David Starner
2001-08-24 23:44 ` sk
2001-08-25  2:56 ` sk [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