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-Language: ENGLISH,ASCII X-Google-Thread: 103376,f954bcd9ffa6c26c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-17 05:18:54 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!howland.erols.net!netnews.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: Gnat 3.13p: Command_Name RM A.15 Date: Wed, 17 Jan 2001 08:15:55 -0500 Organization: MindSpring Enterprises Message-ID: <3A659B05.4FA24A08@mindspring.com> References: <200101160612.HAA06787@bulgaria.otn.eurocopter.de> <3A64593A.380F3228@mindspring.com> <94244d$ir2$1@wanadoo.fr> NNTP-Posting-Host: d1.56.b2.13 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Server-Date: 17 Jan 2001 13:16:56 GMT X-Mailer: Mozilla 4.07 [en] (WinNT; I) Xref: supernews.google.com comp.lang.ada:4091 Date: 2001-01-17T13:16:56+00:00 List-Id: 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" 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] ======================================================================