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-7-bit X-Google-Thread: 103376,f954bcd9ffa6c26c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-16 06:26:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!feed2.onemain.com!feed1.onemain.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: Tue, 16 Jan 2001 09:22:51 -0500 Organization: MindSpring Enterprises Message-ID: <3A64593A.380F3228@mindspring.com> References: <200101160612.HAA06787@bulgaria.otn.eurocopter.de> NNTP-Posting-Host: d1.56.bb.a8 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 16 Jan 2001 14:23:45 GMT X-Mailer: Mozilla 4.07 [en] (WinNT; I) Xref: supernews.google.com comp.lang.ada:4053 Date: 2001-01-16T14:23:45+00:00 List-Id: The problem you are having is due to the fact that command line behavior is operating system dependent. The compiler has to ask the OS to give it the contents of the command line because it can't get it for itself. (The command line is determined before your compiled code is even up and running.) So you're stuck with the problem that various flavors of Unix are going to parse things on the command line before handing it to your program. WinXX is going to do similar things, only differently from Unix. VMS behaves in its own way. None of these OS's have ever agreed on how a command line should be treated, so there is no portable way of dealing with it. Note that this isn't something that the language can specify. It would be the same problem in C/C++ or any other language. 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. MDC Christoph Grein wrote: > On win98 with Gnat3.13p, Ada.Command_Line.Command_Name always returns the full > path, irrespective of the actual command line (executable only, relative or > absolute path), whereas on winNT, only the string as entered on the command line > is returned. > > This different behaviour is annoying when trying to write portable code and you > need the full path (including drive). -- ====================================================================== 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] ======================================================================