From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a42a9e2a65b6a5c7 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Temporary files in Ada95. Date: 1999/03/26 Message-ID: #1/1 X-Deja-AN: 459401324 Sender: matt@mheaney.ni.net References: <7dfrv7$gvv$1@nnrp1.dejanews.com> <7de1t6$usl$1@nnrp1.dejanews.com> NNTP-Posting-Date: Fri, 26 Mar 1999 08:54:35 PDT Newsgroups: comp.lang.ada Date: 1999-03-26T00:00:00+00:00 List-Id: 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.