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,FREEMAIL_FROM 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!postnews.google.com!l16g2000hsf.googlegroups.com!not-for-mail From: gautier_niouzes@hotmail.com Newsgroups: comp.lang.ada Subject: Re: DOS Options Date: Wed, 5 Dec 2007 02:06:55 -0800 (PST) Organization: http://groups.google.com Message-ID: <9c200c78-7c5a-4861-9b73-6a589452aa56@l16g2000hsf.googlegroups.com> References: <1i8m324.g6pon43ql1ogN%csampson@inetworld.net> NNTP-Posting-Host: 206.122.158.4 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1196849215 12533 127.0.0.1 (5 Dec 2007 10:06:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Dec 2007 10:06:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l16g2000hsf.googlegroups.com; posting-host=206.122.158.4; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18719 Date: 2007-12-05T02:06:55-08:00 List-Id: On 5 Dez., 04:34, csamp...@inetworld.net (Charles H. Sampson) wrote: > I've been using GNAT 3.15p for a long time to write DOS-like > project utiities to run on my Wintel desktop. I've just come up with a > case where I'd like to implement optional parameters. Since the utility > is DOS-like, I want to use the DOS form of optional parameters: attached > to the name of the command, separated by the '/' character. > > I don't see how to do this. Command_Line.Argument doesn't accept a > value of 0, which I remember as being the substring of the command line > from the first non-blank up to the first suceeding blank. The note in > A.15 says that Command_Name is the equivalent of argv (0), but in GNAT > that's really just the command name, options stripped off. > > Does anybody have any suggestions? Yes: try... You will see that the option attached to the command name appears in Argument(1), the OS does the separation for you; nothing specific to GNAT or Ada... If you want an example, here is one: http://homepage.sunrise.ch/mysunrise/gdm/uza_html/unzipada__adb.htm The commands unzipada/t test.zip or unzipada /t test.zip or unzipada -t test.zip work as expected HTH G.