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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aeb3845dd355cf6c X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Sequential_IO Date: 1999/08/18 Message-ID: <37BB0850.ADBA4B6A@pwfl.com>#1/1 X-Deja-AN: 514335193 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <0a0133f8.48529b21@usw-ex0102-014.remarq.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: e108678@pwflcom Newsgroups: comp.lang.ada Date: 1999-08-18T00:00:00+00:00 List-Id: Shawn Barber wrote: > I am using Sequential_IO to read some data from a file. Why > do I need to specify the full path of the file being read > when I'm running the program from the directory in which the > file resides? I'm getting the filename from the command line > and in I continually get a Name_Error unless I specify the > path as well. Any ideas? I didn't see anything in the LRM, > but that doesn't mean it's not there. Thanks. You need to specify the compiler/version and target operating system/version. The connection to a file is inherently dependent on the operating system and the compiler implementation and therefore cannot be spelled out specifically as part of the language standard. Using GNAT 3.11p on a PC/NT platform, I seem to be able to open up files in the default directory using Sequential_IO. If you look on my website, in the Ada Programming page, you will find a chop file filled with small example programs - one of which uses Sequential_IO. The URL to get there directly is: http://www.mcondic.com/gnat_examples.txt These have also been used on Unix platforms, but I have not done so lately & couldn't testify to the exact version of anything there. You might look it over to see if your code is doing something similar. Note: You might also want to post a small example concerning exactly how you are reading in the string with the filename and how you are passing that to the Create/Open since there is some chance you are not correctly passing the string around. If you aren't trimming the unread parts of the string away, you may be passing garbage data along with the name which causes the Name_Error. MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 ***To reply, remove "bogon" from the domain name.*** Visit my web page at: http://www.mcondic.com/