From: emery@goldfinger.mitre.org (David Emery)
Subject: Re: I have a question...
Date: 13 Oct 94 15:29:43
Date: 1994-10-13T15:29:43+00:00 [thread overview]
Message-ID: <EMERY.94Oct13152943@goldfinger.mitre.org> (raw)
In-Reply-To: jakrzy@ss3.magec.com's message of Thu, 13 Oct 1994 17:13:10 GMT
Let me clarify what is going on here, since there appears to be some
confusion.
The Unix (POSIX) system interface does NOT recognize the "~~
character. This (like other wildcards, such as "*" and "?") is
processed by the shell (or by a 'friendly' applications program.)
So a call to OPEN (FILENAME => "~/myfile") will not work correctly if
the OPEN procedure does not interpret the "~" character. This would
be the case for POSIX_IO.OPEN, for instance.
A call to SYSTEM (COMMAND => "~/bin/myprogram ~/myfile") will probably
work correctly, assuming that SYSTEM here is the Unix system command,
which invokes the shell.
What is interesting is a call to TEXT_IO.OPEN (NAME => "~/myfile").
This is interesting because there is no requirement for TEXT_IO to
process wildcards, but it is not 'illegal' for TEXT_IO to do so. Nor
does the POSIX/Ada standard (IEEE Std 1003.5-1992) say anything about
this (maybe it should...) As a result, this call to TEXT_IO.OPEN is
clearly implementation-defined, and different Ada compilers on the
same operating system may give different results.
I hope this clarifies the situation. The bottom line: "~" is a
wildcard processed by the shell, just as "*" and "?". Some friendly
applications duplicate the shell processing, but users should not
expect this for 'standard' interfaces such as TEXT_IO and POSIX_IO.
dave
--
--The preceeding opinions do not necessarily reflect the opinions of
--The MITRE Corporation or its sponsors.
-- "A good plan violently executed -NOW- is better than a perfect plan
-- next week" George Patton
-- "Any damn fool can write a plan. It's the execution that gets you
-- all screwed up" James Hollingsworth
-------------------------------------------------------------------------
next prev parent reply other threads:[~1994-10-13 15:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1994Oct07.034523.161470@zeus.aix.calpoly.edu>
[not found] ` <SPIEGEL.94Oct10115716@moskau.bruessel.informatik.uni-stuttgart.de>
1994-10-12 17:33 ` I have a question David Emery
1994-10-14 1:21 ` Keith Thompson @pulsar
1994-10-14 16:46 ` Andre Spiegel
1994-10-14 14:16 ` David Emery
1994-10-14 21:32 ` Norman H. Cohen
1994-10-17 10:34 ` Ada programs in a UNIX environment (was Re: I have a question...) Andre Spiegel
1994-10-15 11:28 ` I have a question Keith Thompson @pulsar
1994-10-14 7:38 ` Henri Altarac
1994-10-14 21:25 ` Kevin Cline
1994-10-13 17:13 ` James A. Krzyzanowski
1994-10-13 15:29 ` David Emery [this message]
[not found] <1994Oct07.034523.161470@zeus.aix>
1994-10-14 11:16 ` emery
1994-10-14 16:46 ` spiegel
1994-10-15 16:52 ` ncohen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox