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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f954bcd9ffa6c26c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-18 04:50:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Gnat 3.13p: Command_Name RM A.15 Message-ID: References: Organization: LJK Software Date: 18 Jan 2001 07:38:32 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 979821517 216.44.122.34 (Thu, 18 Jan 2001 12:38:37 GMT) NNTP-Posting-Date: Thu, 18 Jan 2001 12:38:37 GMT Xref: supernews.google.com comp.lang.ada:4148 Date: 2001-01-18T07:38:32-05:00 List-Id: In article , Christoph Grein writes: > Thanks to all for their responses. > > Randy Brukardt gave me a nice solution (it may not be applicable for all cases, > but for me, it worked). > > The original question was: > > How do I get the full name of Ada.Command_Line.Command_Name? The result of > Command_Name is implementation dependent. > > Open the file with the name given by Command_Name, call the Name function which > by A8.2(22) must return the full name, then close the file again: Certainly you are correct that this may not be applicable for all cases. The assumption that the implementation-dependent Command_Name bears any relationship to a file name would seem to be fraught with peril. I have not used an Ada95 compiler on VMS, but I would expect something called Command_Name to return the command I had typed, rather than the filename of the executable image that implemented that command. Some typical commands and images they execute are: SET PASSWORD SETP0.EXE SET CLASS SETSHOCLASS.EXE SHOW CLASS SETSHOCLASS.EXE SET HOST/HSC HSCPAD.EXE SET HOST/RLOGIN OPENVMS$RLOGIN.EXE SET DISPLAY DECW$SETSHODIS.EXE Those commands do not happen to be implemented in Ada, but they could be. ============================================================================== Great Inventors of our time: Al Gore -> Internet; Sun Microsystems -> Clusters ==============================================================================