comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: How to get the application path
Date: Wed, 25 Jul 2007 06:05:01 -0400
Date: 2007-07-25T06:05:01-04:00	[thread overview]
Message-ID: <uzm1khk8i.fsf@stephe-leake.org> (raw)
In-Reply-To: wccejixx5dm.fsf@shell01.TheWorld.com

Robert A Duff <bobduff@shell01.TheWorld.com> writes:

> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
>> Adam Beneschan <adam@irvine.com> writes:
>>> If we assume that Command_Name returns the name of some (executable)
>>> file that may or may not be a full path name, then
>>> Ada.Directories.Full_Name (Ada.Command_Line.Command_Name) should
>>> return the full path, 
>>
>> Yes, this is the right solution.
>
> I don't think Full_Name is what you want.
>
> If you are in /home/myself, and you type foo on the command line, and it
> finds /usr/bin/foo (using your path) and runs it, and Command_Name = "foo",
> then calling Full_Name will give you /home/myself/foo, not
> /usr/bin/foo.

Hmm. It seems I missed A.16 (48):

48/2
    The default directory is the directory that is used if a directory or
    file name is not a full name (that is, when the name does not fully
    identify all of the containing directories).

-- 
-- Stephe



  parent reply	other threads:[~2007-07-25 10:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  7:20 How to get the application path Rangdalf
2007-07-23 12:06 ` qouify
2007-07-23 12:34 ` Stephen Leake
2007-07-23 15:27   ` Adam Beneschan
2007-07-23 16:27     ` Markus E Leypold
2007-07-24 11:14       ` Stephen Leake
2007-07-24 11:35         ` Markus E Leypold
2007-07-23 16:37     ` Dmitry A. Kazakov
2007-07-24 11:11     ` Stephen Leake
2007-07-24 11:44       ` Niklas Holsti
2007-07-24 19:33         ` Randy Brukardt
2007-07-24 20:30           ` Niklas Holsti
2007-07-24 22:01             ` Markus E Leypold
2007-07-24 21:56           ` Markus E Leypold
2007-07-26 10:39             ` Stephen Leake
2007-07-30 23:38               ` Markus E.L.
2007-08-02  4:31                 ` Randy Brukardt
2007-08-02 22:23                   ` Markus E.L. 2
2007-07-24 14:07       ` Robert A Duff
2007-07-24 14:58         ` Adam Beneschan
2007-07-25 10:05         ` Stephen Leake [this message]
2007-07-24 14:55       ` Adam Beneschan
2007-07-24 15:41         ` Markus E Leypold
2007-07-25 19:13           ` Randy Brukardt
2007-07-23 18:51 ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox