comp.lang.ada
 help / color / mirror / Atom feed
From: John J Cupak Jr <John_J_Cupak@res.raytheon.com>
Subject: Re: Create-Delete tmp Files
Date: 2000/03/17
Date: 2000-03-17T00:00:00+00:00	[thread overview]
Message-ID: <38D27008.4055C0AB@res.raytheon.com> (raw)
In-Reply-To: 8at7g0$bhc$1@nnrp1.deja.com

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Achim,

If you create a file without specifying the name, Ada is supposed to create
a temporary
file which is "automagically" deleted on close. You shouldn't need the
Delete call.

Hope this helps.
John


Achim Gerhard wrote:

> Hi all,
> is this legal Ada code?
> loop
> Text_IO.Create ( File => the_file, Mode => Text_IO.OUT_File );
> Text_IO.Reset ( File => the_file, Mode => Text_IO.IN_File );
> Text_IO.Delete ( File => the_file );
> end loop;
> The background is:
> in an application I use a temporary file. First i create a (noname) file
> and write some stuff into that file. After that, I want to read that
> stuff. So, I'll open that file as In_File and read from the beginning
> (reset...).
> Finally I throw away that file (delete).
> The main things Create/Reset/Delete are written in the code fragment
> above.
> I don't see anything illegal in this code, but the Ada runtime seems to
> accumulate memory (for file handles?) until ... it throws in the towel.
> Any comments?
> Hope this will not lead into a discussion 'how2use tmp files' :-)
> Regards,
> Achim
> --
> _ _
> /A/G
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

[-- Attachment #2: Card for John J Cupak Jr --]
[-- Type: text/x-vcard, Size: 364 bytes --]

begin:vcard 
n:Cupak Jr;John J
tel;fax:978.858.4336
tel;work:978.858.1222
x-mozilla-html:TRUE
org:Raytheon Company;Northeast Software Training
version:2.1
email;internet:John_J_Cupak@res.raytheon.com
title:Software Engineering Instructor
adr;quoted-printable:;;50 Apple Hill Road=0D=0AT3MN35;Tewksbury;MA;01876;USA
x-mozilla-cpt:;9904
fn:John J Cupak Jr
end:vcard

  parent reply	other threads:[~2000-03-17  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17  0:00 Create-Delete tmp Files Achim Gerhard
2000-03-17  0:00 ` Robert Dewar
2000-03-17  0:00 ` John J Cupak Jr [this message]
2000-03-18  0:00   ` Robert Dewar
2000-03-20  0:00     ` Achim Gerhard
2000-03-20  0:00       ` tmoran
2000-03-21  0:00         ` Achim Gerhard
2000-03-21  0:00           ` Robert Dewar
2000-03-21  0:00           ` Roger Barnett
2000-03-23  0:00             ` Achim Gerhard
2000-03-23  0:00               ` Robert Dewar
2000-03-24  0:00                 ` Achim Gerhard
2000-03-24  0:00                   ` Robert Dewar
2000-03-23  0:00               ` tmoran
2000-03-20  0:00       ` Gautier
2000-03-20  0:00         ` Preben Randhol
2000-03-20  0:00           ` Gautier
2000-03-20  0:00             ` Preben Randhol
2000-03-20  0:00       ` Robert A Duff
2000-03-20  0:00         ` Achim Gerhard
2000-03-20  0:00           ` Robert A Duff
replies disabled

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