comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Gnat 3.13p: Command_Name RM A.15
Date: Thu, 18 Jan 2001 15:12:22 GMT
Date: 2001-01-18T15:12:22+00:00	[thread overview]
Message-ID: <94714f$7mp$1@nnrp1.deja.com> (raw)
In-Reply-To: mailman.979801451.11095.comp.lang.ada@ada.eu.org

In article <mailman.979801451.11095.comp.lang.ada@ada.eu.org>,
  comp.lang.ada@ada.eu.org wrote:

> Randy Brukardt gave me a nice solution (it may not be
> applicable for all cases,  but for me, it worked).
>
> The original question was:
>
> 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:

This obviously does NOT work if the file is not in the current
directory, which for an executable file is likely. Writing a
program that only works if its executable is in the current
directory is defintely very bad practice, so this "solution"
cannot be recommended.

There is no general way of getting the full path of the
current executable if it is not availabel in arg(0), which
is why this cannot be guaranteed.

This is an old old problem, nothing to do with Ada or GNAT!


Sent via Deja.com
http://www.deja.com/



  parent reply	other threads:[~2001-01-18 15:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-18  6:59 Gnat 3.13p: Command_Name RM A.15 Christoph Grein
2001-01-18 12:38 ` Larry Kilgallen
2001-01-18 14:32   ` Marin David Condic
2001-01-18 14:54   ` Ted Dennison
2001-01-18 15:12 ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-19  7:26 Christoph Grein
2001-01-18 12:10 Schroeer, Joachim Dr.
2001-01-18 12:19 ` Lutz Donnerhacke
2001-01-16  6:12 Christoph Grein
2001-01-16 14:22 ` Marin David Condic
2001-01-16 18:14   ` Jean-Pierre Rosen
2001-01-17 13:15     ` Marin David Condic
2001-01-17 19:12       ` Jean-Pierre Rosen
2001-01-18  3:28         ` Robert Dewar
2001-01-18 13:23           ` Marin David Condic
2001-01-18 15:15             ` Robert Dewar
2001-01-18 17:37           ` Jean-Pierre Rosen
2001-01-19 20:31             ` Florian Weimer
2001-01-18  3:25       ` Robert Dewar
2001-01-18 14:06         ` Marin David Condic
2001-01-17 19:17   ` Stephen Leake
2001-01-18  3:31     ` Robert Dewar
2001-01-18 14:13       ` Marin David Condic
2001-01-18 15:16     ` Robert Dewar
replies disabled

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