comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic@mindspring.com>
Subject: Re: Gnat 3.13p: Command_Name RM A.15
Date: Wed, 17 Jan 2001 08:15:55 -0500
Date: 2001-01-17T13:16:56+00:00	[thread overview]
Message-ID: <3A659B05.4FA24A08@mindspring.com> (raw)
In-Reply-To: 94244d$ir2$1@wanadoo.fr

This could be helpful. There are probably also compiler-vendor-supplied routines that might accomplish the same thing. The only
difficulty is that there is no *standard* way of doing it, hence no *portable* way of handling it. At least in the sense that you might
switch targets, but if you also switched compiler vendors, you would have to make some changes.

You do have System.System_Name available to you, but it is, of course, system/implementation dependent as to what the values will be.
So you can't write codes that said something to the effect:

case (System.Name) is
    when Sun_Unix => ... ;
    when Windows_NT => ... ;
    when ...
end case ;

I suppose it could be possible that the compiler vendors could agree on some set of enumerals and keep the list updated as new targets
emerge. That would enable code to be written that would get past the compiler. It just wouldn't do you any good if a specific system
wasn't supported. That naturally reduces product distinction and starts moving compilers more towards commodities, but there are
probably enough ways of distinguishing compilers that such an interoperability feature wouldn't harm the business.

MDC

Jean-Pierre Rosen wrote:

> "Marin David Condic" <mcondic@mindspring.com> a �crit dans le message news: 3A64593A.380F3228@mindspring.com...
> > You might try writing something that attempts to detect the type of system it is
> > running on and then parse the command line accordingly. Unfortunately, I know of no
> > *standard* way of doing that.
> OS_Services (available from http://pro.wanadoo.fr/adalog/compo2.htm) does provide this functionnality (not perfect though), as well
> as a function that returns the full executable path independently of the OS.
>
> --
> ---------------------------------------------------------
>            J-P. Rosen (Rosen.Adalog@wanadoo.fr)
> Visit Adalog's web site at http://pro.wanadoo.fr/adalog

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "I'd trade it all for just a little more"
        --  Charles Montgomery Burns, [4F10]
======================================================================





  reply	other threads:[~2001-01-17 13:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-16  6:12 Gnat 3.13p: Command_Name RM A.15 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2001-01-18  6:59 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
2001-01-18 12:10 Schroeer, Joachim Dr.
2001-01-18 12:19 ` Lutz Donnerhacke
2001-01-19  7:26 Christoph Grein
replies disabled

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