comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Temporary files in Ada95.
Date: 1999/03/26
Date: 1999-03-26T00:00:00+00:00	[thread overview]
Message-ID: <m3aex0xk5p.fsf@mheaney.ni.net> (raw)
In-Reply-To: cPLK2.25745$EF1.95979499@WReNphoon1

jboulais@sikorsky.com (Boulais, Jeffrey M) writes:

> In response to Mathew, Yes I am sure I am using Create.  I looked at
> RM95 A.8.2(4).  That is a Sequental_IO section,

No.  That section applies to _all_ the predefined file packages.


> and I should have specified the first time that I am trying to do this
> under Text_IO.  However, I still did not see anything under A.8.2(4)
> that discussed temporary files.

The number is parens (here, 4) denotes the paragraph number, which
reads:

4   A null string for Name specifies an external file that is not
    accessible after the completion of the main program (a temporary 
    file).

So that paragraph does indeed speak about temporary files.


> The reference I made is from "Ada Programmer's Handbook and LRM" (83),
> section 14.2.1(3)
> 
> Here's what I am trying to do:
> 
> Text_IO.Create (
>    File => Temp_File ,
>    Mode => Text_IO.Out_File ,
>    Name => "" ) ;


The following programs runs without error using GNAT 3.11p, gcc-2.8.1,
linuxppc R4:


with Text_IO;
procedure Test_Create is

   Temp_File : Text_IO.File_Type;

begin

   Text_IO.Create (File => Temp_File,
                   Mode => Text_IO.Out_File,
                   Name => "" );

end;


 
> Now, this technique was kindof working compiling under Gnat3.04, using
> the -gnatp switch (suppress runtime checks).  It would create files
> like "ADA_TEMP_a00068", that were not begin destroyed upon program
> completion.  I recently upgraded to Gnat3.11, and this no longer works
> for me.  I know this sounds like a Gnat problem at first, but I have
> found that Gnat3.04 let a lot of things work that shouldn't.

If you're using GNAT, you can always post a note to the gnat chat list.
ACT employees read that list and may be able to give you more specific
advice as to why you're having a problem.

<mailto:chat@gnat.com>








  reply	other threads:[~1999-03-26  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-25  0:00 Temporary files in Ada95 jboulais
1999-03-26  0:00 ` Boulais, Jeffrey M
1999-03-26  0:00   ` Boulais, Jeffrey M
1999-04-02  0:00     ` Jerry van Dijk
1999-03-26  0:00   ` Jeffrey D. Cherry
1999-03-26  0:00     ` Larry Kilgallen
1999-03-29  0:00       ` Jeffrey D. Cherry
1999-03-31  0:00       ` Boulais, Jeffrey M
1999-03-31  0:00         ` Jeffrey D. Cherry
1999-03-31  0:00           ` Matthew Heaney
1999-03-31  0:00             ` Jeffrey D. Cherry
1999-04-01  0:00               ` John J Cupak Jr
1999-03-26  0:00   ` Matthew Heaney
1999-03-26  0:00 ` robert_dewar
1999-03-26  0:00 ` Boulais, Jeffrey M
1999-03-26  0:00   ` Matthew Heaney [this message]
1999-03-26  0:00 ` Matthew Heaney
replies disabled

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