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: jerry@jvdsys.stuyts.nl (Jerry van Dijk) Subject: Re: Temporary files in Ada95. Date: 1999/04/02 Message-ID: #1/1 X-Deja-AN: 461951383 References: <7dfrv7$gvv$1@nnrp1.dejanews.com> <7de1t6$usl$1@nnrp1.dejanews.com> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1999-04-02T00:00:00+00:00 List-Id: Boulais, Jeffrey M (jboulais@sikorsky.com) wrote: : I'd like to say "Thanks to all", you were quite helpful. After closer : inspection, it appears that I was not : reading section A.8.2 closely enough because I thought it delt with : Sequential IO. : : However, I did compile the test program supplied by Jeffrey D. Cherry, and I : still get a name error. This leads : me to believe that this is either a Gnat problem, or a problem with my : install of Gnat. Thanks again... One of the wonderful advantages of GNAT is that you have the sourcecode... In this case, if you check you adainclude directory, you can see what happens if you do not provide a name, by following: ada.text_io -> system.file_io -> interfaces.c_streams to find that GNAT will use the MS C runtime library function 'tmpnam' to create a temporary filename. Looking up the documentation for 'tmpnam' (it's online if you do not have it locally), you will find that the directory the file is created in is the directory pointed to by the TMP environment variable. So, either make sure you have read/write access to this directory, or have the TMP variable point to somewhere you do have these rights. (technical note: there are other C runtime library functions that do not exhibit this behaviour, but those are less portable (between Win32 versions and other OS's), so I think this is a reasonable choice). -- -- Jerry van Dijk | Leiden, Holland -- Team Ada | jdijk@acm.org -- see http://stad.dsl.nl/~jvandyk