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-Thread: 103376,502b8ae4630fba59 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: DOS Options Date: Wed, 19 Dec 2007 16:59:25 -0600 Organization: Jacob's private Usenet server Message-ID: References: <1i8m324.g6pon43ql1ogN%csampson@inetworld.net> <1i9d4ab.twgszk4zp5evN%csampson@inetworld.net> <476973a3$1_5@news.bluewin.ch> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1198105033 2927 69.95.181.76 (19 Dec 2007 22:57:13 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 19 Dec 2007 22:57:13 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19007 Date: 2007-12-19T16:59:25-06:00 List-Id: "Gautier" wrote in message news:476973a3$1_5@news.bluewin.ch... ... > Your 3.15p is certainly the Windows version, and what you are seeing is a Win32 > console output. Indeed, you need to congratulate Microsoft which decided to > parse and separate the arguments in Win32 in a fashion consistent with DOS - > adding the parsing of filenames containing spaces, enclosed by "". > Ada.Command_Line.Argument(i) just gives the "ith" argument from the system, as > the system wants to give it, that's it. I have no idea what you are talking about. Both MS-DOS and Win32 only provide a single string as the result of the command line -- the system provides no parsing whatsoever. For Win32, the function is GetCommandLine. In DOS, you had to grab the string from the memory of your executable process -- there isn't even a function to get it. Parsing is something that was provided by C compilers on both of those platforms. The was generally defined to be compatible with the Unix C implementations (since that is how C was originally defined). Janus/Ada never did any parsing at all (just returning a single string, even on Unix); if we had done some, it would have separated the options out as the original OP suggested. But that would be fairly complex to do, we never figured out a good way to encapsulate it for our products, so we didn't make that library available to our customers. I'm a little stunned that Turbo Pascal would have copied this useless parsing definition, given that they had to write all of the code themselves. But perhaps it is the same reason that we ended up doing so for Ada.Command_Line: to be compatible with C compilers and/or (possible) Unix versions of your product. In any event, Microsoft's OSes have had nothing whatsoever to do the the parsing of command lines. All of the code to parse the command line appears inside of Ada.Command_Line for a Windows implementation (or perhaps some lower-level library intended to emulate Unix behavior). Randy.