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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b97aa4480eccc494 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!news-fra1.dfn.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How to get the application path Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <46a456aa$0$25908$426a34cc@news.free.fr> <1185204459.328520.240930@z24g2000prh.googlegroups.com> Date: Mon, 23 Jul 2007 18:37:28 +0200 Message-ID: <1pmt2we23aez2$.15alby2f02jzp.dlg@40tude.net> NNTP-Posting-Date: 23 Jul 2007 18:37:11 CEST NNTP-Posting-Host: f12cec94.newsspool1.arcor-online.net X-Trace: DXC=LK]\BH3Yb:P?e3KLE]DjDNcfSJ;bb[eIRnRBaCdaW9MSc X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16556 Date: 2007-07-23T18:37:11+02:00 List-Id: On Mon, 23 Jul 2007 08:27:39 -0700, Adam Beneschan wrote: > I really have to question this. I tried it using GNAT on Linux, and > (as I expected) Command_Name simply returns whatever was the first > token I entered on the shell command line---i.e. argv[0] (which is > what the Ada 95 manual hints that Command_Name should return). > > Maybe things are different on Windows, but the original poster didn't > refer to any particular operating system. AFAIK Windows indeed places the module name into argv[0] rather than the first token of the command line (the module name is what GetModuleFileName API would return). The original command line can still be obtained via GetCommandLine. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de