* Re: Default directory in Ada 2005 [not found] <13gbgp41ajc4071@corp.supernews.com> @ 2007-10-05 15:51 ` Adam Beneschan 2007-10-06 5:14 ` ME 0 siblings, 1 reply; 6+ messages in thread From: Adam Beneschan @ 2007-10-05 15:51 UTC (permalink / raw) On Oct 4, 9:52 pm, "ME" <abcd...@nonodock.net> wrote: > If the default directory is set then can I just omit the path in "Open" so that it will use it or is something else meant by default? If you mean that you've used Directories.Set_Directory to set the default directory, then yes, I think the default directory is supposed to be used for any external file names that aren't fully specified (A. 16(48)). -- Adam ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Default directory in Ada 2005 2007-10-05 15:51 ` Default directory in Ada 2005 Adam Beneschan @ 2007-10-06 5:14 ` ME 2007-10-07 2:48 ` Randy Brukardt 0 siblings, 1 reply; 6+ messages in thread From: ME @ 2007-10-06 5:14 UTC (permalink / raw) This does not appear to work. Since open was Ada 95 was it rewritten to use default directory ? "Adam Beneschan" <adam@irvine.com> wrote in message news:1191599479.895076.191170@k79g2000hse.googlegroups.com... > On Oct 4, 9:52 pm, "ME" <abcd...@nonodock.net> wrote: >> If the default directory is set then can I just omit the path in "Open" >> so that it will use it or is something else meant by default? > > If you mean that you've used Directories.Set_Directory to set the > default directory, then yes, I think the default directory is supposed > to be used for any external file names that aren't fully specified (A. > 16(48)). > > -- Adam > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Default directory in Ada 2005 2007-10-06 5:14 ` ME @ 2007-10-07 2:48 ` Randy Brukardt 2007-10-08 23:03 ` ME 0 siblings, 1 reply; 6+ messages in thread From: Randy Brukardt @ 2007-10-07 2:48 UTC (permalink / raw) All common target systems for Ada have the concept of a default directory, and that is built into the target system, so it would take a lot of work for any Ada compiler (of ANY vintage, including Ada 83) to ignore the default directory in file opens. The only new thing is that Ada has acknowledged the existence of this common concept. Surely, any failure to properly handle Open is a bug in a particular implementation, not of the language. (Nothing has changed in the definition of Open; the meaning of the default directory is target-specific and implementation-defined in any case.) You need to contact the vendor of your implementation, or at least tell us exactly what implementation you are referring to, in order to get any useful help. Randy. "ME" <abcdefg@nonodock.net> wrote in message news:13ge6d348ciln86@corp.supernews.com... > This does not appear to work. Since open was Ada 95 was it rewritten to use > default directory ? > > "Adam Beneschan" <adam@irvine.com> wrote in message > news:1191599479.895076.191170@k79g2000hse.googlegroups.com... > > On Oct 4, 9:52 pm, "ME" <abcd...@nonodock.net> wrote: > >> If the default directory is set then can I just omit the path in "Open" > >> so that it will use it or is something else meant by default? > > > > If you mean that you've used Directories.Set_Directory to set the > > default directory, then yes, I think the default directory is supposed > > to be used for any external file names that aren't fully specified (A. > > 16(48)). > > > > -- Adam > > > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Default directory in Ada 2005 2007-10-07 2:48 ` Randy Brukardt @ 2007-10-08 23:03 ` ME 2007-10-09 1:18 ` Randy Brukardt 0 siblings, 1 reply; 6+ messages in thread From: ME @ 2007-10-08 23:03 UTC (permalink / raw) Thanks Randy, I am using Gnat 4.02 (20061211) A) I set the default directory using Set_directory which works. B) I read the files into an array of strings using "search" . The strings are padded with blanks. C) I try an "open" using just the filename with no path and I get a Name_error "Randy Brukardt" <randy@rrsoftware.com> wrote in message news:fe9h82$g6u$1@jacob-sparre.dk... > All common target systems for Ada have the concept of a default directory, > and that is built into the target system, so it would take a lot of work > for > any Ada compiler (of ANY vintage, including Ada 83) to ignore the default > directory in file opens. The only new thing is that Ada has acknowledged > the > existence of this common concept. > > Surely, any failure to properly handle Open is a bug in a particular > implementation, not of the language. (Nothing has changed in the > definition > of Open; the meaning of the default directory is target-specific and > implementation-defined in any case.) You need to contact the vendor of > your > implementation, or at least tell us exactly what implementation you are > referring to, in order to get any useful help. > > Randy. > > "ME" <abcdefg@nonodock.net> wrote in message > news:13ge6d348ciln86@corp.supernews.com... >> This does not appear to work. Since open was Ada 95 was it rewritten to > use >> default directory ? >> >> "Adam Beneschan" <adam@irvine.com> wrote in message >> news:1191599479.895076.191170@k79g2000hse.googlegroups.com... >> > On Oct 4, 9:52 pm, "ME" <abcd...@nonodock.net> wrote: >> >> If the default directory is set then can I just omit the path in >> >> "Open" >> >> so that it will use it or is something else meant by default? >> > >> > If you mean that you've used Directories.Set_Directory to set the >> > default directory, then yes, I think the default directory is supposed >> > to be used for any external file names that aren't fully specified (A. >> > 16(48)). >> > >> > -- Adam >> > >> > >> >> > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Default directory in Ada 2005 2007-10-08 23:03 ` ME @ 2007-10-09 1:18 ` Randy Brukardt 2007-10-09 5:27 ` ME 0 siblings, 1 reply; 6+ messages in thread From: Randy Brukardt @ 2007-10-09 1:18 UTC (permalink / raw) "ME" <abcdefg@nonodock.net> wrote in message news:13gldqhkecs7l67@corp.supernews.com... > Thanks Randy, > > I am using Gnat 4.02 (20061211) > > A) I set the default directory using Set_directory which works. > B) I read the files into an array of strings using "search" . The strings > are padded with blanks. > C) I try an "open" using just the filename with no path and I get a > Name_error Possibly the padding blanks are significant? They certainly would be on Windows: "ME" and "ME " are different files; that might cause your Name_Error. Randy. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Default directory in Ada 2005 2007-10-09 1:18 ` Randy Brukardt @ 2007-10-09 5:27 ` ME 0 siblings, 0 replies; 6+ messages in thread From: ME @ 2007-10-09 5:27 UTC (permalink / raw) You're absolutely right I can't have the extra spaces. I never tried naming a file in windows with spaces at the end. "Randy Brukardt" <randy@rrsoftware.com> wrote in message news:feeko8$1l2$1@jacob-sparre.dk... > "ME" <abcdefg@nonodock.net> wrote in message > news:13gldqhkecs7l67@corp.supernews.com... >> Thanks Randy, >> >> I am using Gnat 4.02 (20061211) >> >> A) I set the default directory using Set_directory which works. >> B) I read the files into an array of strings using "search" . The strings >> are padded with blanks. >> C) I try an "open" using just the filename with no path and I get a >> Name_error > > Possibly the padding blanks are significant? They certainly would be on > Windows: "ME" and "ME " are different files; that might cause your > Name_Error. > > Randy. > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-09 5:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <13gbgp41ajc4071@corp.supernews.com> 2007-10-05 15:51 ` Default directory in Ada 2005 Adam Beneschan 2007-10-06 5:14 ` ME 2007-10-07 2:48 ` Randy Brukardt 2007-10-08 23:03 ` ME 2007-10-09 1:18 ` Randy Brukardt 2007-10-09 5:27 ` ME
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox