comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <condicma@bogon.pwfl.com>
Subject: Re: Sequential_IO
Date: 1999/08/18
Date: 1999-08-18T00:00:00+00:00	[thread overview]
Message-ID: <37BB0850.ADBA4B6A@pwfl.com> (raw)
In-Reply-To: 0a0133f8.48529b21@usw-ex0102-014.remarq.com

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/






  parent reply	other threads:[~1999-08-18  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-18  0:00 Sequential_IO Shawn Barber
1999-08-18  0:00 ` Sequential_IO Larry Kilgallen
1999-08-18  0:00 ` Sequential_IO Ted Dennison
1999-08-18  0:00 ` Marin David Condic [this message]
1999-08-19  0:00 ` Sequential_IO Tucker Taft
1999-08-19  0:00   ` Sequential_IO Ted Dennison
1999-08-19  0:00     ` Sequential_IO Robert Dewar
1999-08-21  0:00     ` Sequential_IO Simon Wright
1999-08-19  0:00   ` Sequential_IO Marin David Condic
1999-08-19  0:00 ` Sequential_IO Shawn Barber
1999-08-19  0:00   ` Sequential_IO David C. Hoos, Sr.
1999-08-19  0:00   ` Sequential_IO Ted Dennison
1999-08-19  0:00   ` Sequential_IO Marin David Condic
replies disabled

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