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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,447a948bb64464c3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-14 17:16:39 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!eff!blanket.mitre.org!linus.mitre.org!linus!mbunix!emery From: emery@goldfinger.mitre.org (David Emery) Newsgroups: comp.lang.ada Subject: Re: I have a question... Date: 13 Oct 94 15:29:43 Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <1994Oct07.034523.161470@zeus.aix.calpoly.edu> NNTP-Posting-Host: goldfinger.mitre.org In-reply-to: jakrzy@ss3.magec.com's message of Thu, 13 Oct 1994 17:13:10 GMT Date: 1994-10-13T15:29:43+00:00 List-Id: 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 -------------------------------------------------------------------------