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-Thread: 103376,b97aa4480eccc494 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: How to get the application path References: <46a456aa$0$25908$426a34cc@news.free.fr> <1185204459.328520.240930@z24g2000prh.googlegroups.com> <1185288900.324049.237880@j4g2000prf.googlegroups.com> From: Markus E Leypold Organization: N/A Date: Tue, 24 Jul 2007 17:41:44 +0200 Message-ID: <5lr6mx6c7b.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:1T4wFzWriw3JqiqJLR/d7x8Jcz0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.211.100 X-Trace: news.arcor-ip.de 1185291045 88.72.211.100 (24 Jul 2007 17:30:45 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:1160 Date: 2007-07-24T17:41:44+02:00 List-Id: > On Jul 24, 4:11 am, Stephen Leake > 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). >> >> Yes, that is exactly what it does. >> >> I guess in the cases I use it, I always launch a program by specifying >> its full path. >> >> That is typically the case for launching from an icon, for example. > > What's an icon? :) :) > > Seriously, I'm enougb of a dinosaur that I still use command lines for > everything, most of the time. (Even on Windows.) I still think it's > the coolest thing that I don't have to punch my commands onto > Hollerith cards any more. I think thepoint is not that the OP wants icons. The problem is to find the application's installation directory (where all other spplication data is, often including configuration) when the application has been started from e.g. a windows desktop. Regards -- Markus