comp.lang.ada
 help / color / mirror / Atom feed
From: John J Cupak Jr <John_J_Cupak@res.raytheon.com>
To: "Jeffrey D. Cherry" <jdcherry@utech.net>
Subject: Re: Temporary files in Ada95.
Date: 1999/04/01
Date: 1999-04-01T19:00:31+00:00	[thread overview]
Message-ID: <3703C24A.CA8B1A87@res.raytheon.com> (raw)
In-Reply-To: 37029918.F637F494@utech.net

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

Jeff and group...

Here's the Ada code I used to illustrate printing a file and deleting it after
close on the DEC system:

with Text_IO;
procedure Send_To_Printer is
  Printer : Text_IO.File_Type;
begin
   Text_IO.Create(File => Printer,
                            Mode => Text_IO.Out_File,
                            Name => "Print.dat",
                            Form => "FILE;" &
                                             "PRINT_ON_CLOSE YES;" &
                                             "DELETE_ON_CLOSE YES;");
   Text_IO.Put_Line(Printer, "And away-y-y-y we go-o-o-o-!");
   Text_IO.Close(Printer);
end Send_To_Printer;

Hope this helps!

Yours in Ada!
John J Cupak, Jr., CCP

Jeffrey D. Cherry wrote:

> >> I don't think you want to ask "Is there a way to make ada not write
> >> temporary files to the root directory?" since it's not really a language
> >> issue.  I view it as an implementation issue.
>
> > The Form parameter is usually used for this kind of thing.
>
> Although, if memory serves, this is correct for VMS, in general I would
> have to say that I haven't found that to be true.  I've found the Form
> parameter to be used for specialized file access, security requests, and
> the like.  Not to force the file to be temporary.  If you could, please
> provide some examples of compiler/OS pairings that create temporary
> files using the Form parameter.  I would appreciate it since that's why
> I read CLA ... to learn new things.  Thanks in advance. :)
>
> >> I would have thought that GNAT would create the temporary file in a
> >> directory where the user has write access.
>
> > Is there a Form parameter for GNAT, to specify where the temporary file
> > gets declared?
>
> I'd have to check the GNAT documentation and the GCC documentation but I
> believe the only Form parameter accepted under any of the Windows
> systems is "shared=yes" or "shared=no", or, of course, a null string.



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

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


  reply	other threads:[~1999-04-01  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 ` Matthew Heaney
1999-03-26  0:00 ` Boulais, Jeffrey M
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   ` 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 [this message]
1999-03-26  0:00   ` Boulais, Jeffrey M
1999-04-02  0:00     ` Jerry van Dijk
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