comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: GNAT's Text_IO & empty files
Date: 1998/07/06
Date: 1998-07-06T00:00:00+00:00	[thread overview]
Message-ID: <dewar.899765885@merv> (raw)
In-Reply-To: 35A0B7C5.1011D794@Maths.UniNe.CH


G D Montmollin asks

<<My question is:
Is it a (a) text file formatting question or (b) a file terminator
question  ? The (b) point of view would be that Text_IO tries
to have a line feed at the end of each text file, although
the only explicit (and facultative) file terminator seems to be the
EOF character. Mine is (a) and I feel it's both harmless and
profitable to comment out the lines following this remark in procedure
Terminate_Line:

    --  For files other than standard error and standard output, we
    --  make sure that an empty file has a single line feed, so that
    --  it is properly formatted. We avoid this for the standard files
    --  because it is too much of a nuisance to have these odd line
    --  feeds when nothing has been written to the file.

         elsif (File /= Standard_Err and then File /= Standard_Out)
           and then (File.Line = 1 and then File.Page = 1)
         then
            New_Line (File);
         end if;

Comments ?... Reactions ?...
>>

Most certainly if you comment these lines out, your resulting runtime will
not be compliant with annex A of the reference manual. These lines were not
put in for amusement!






  parent reply	other threads:[~1998-07-06  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-06  0:00 GNAT's Text_IO & empty files Gautier de Montmollin
1998-07-06  0:00 ` Pascal MALAISE
1998-07-07  0:00   ` Kevin Radke
1998-07-07  0:00   ` Gautier
1998-07-06  0:00 ` Robert Dewar [this message]
1998-07-07  0:00   ` Markus Kuhn
1998-07-07  0:00     ` Gautier
1998-07-07  0:00     ` Samuel Tardieu
1998-07-08  0:00       ` Aaro Koskinen
1998-07-09  0:00         ` Gautier.DeMontmollin
1998-07-09  0:00         ` Samuel Tardieu
1998-07-08  0:00     ` dennison
1998-07-07  0:00   ` Markus Kuhn
1998-07-07  0:00     ` Michael F Brenner
1998-07-07  0:00     ` Robert Dewar
1998-07-07  0:00   ` Gautier
1998-07-07  0:00     ` Robert I. Eachus
1998-07-07  0:00     ` Robert Dewar
replies disabled

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