comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: DOS Options
Date: Wed, 5 Dec 2007 02:06:55 -0800 (PST)
Date: 2007-12-05T02:06:55-08:00	[thread overview]
Message-ID: <9c200c78-7c5a-4861-9b73-6a589452aa56@l16g2000hsf.googlegroups.com> (raw)
In-Reply-To: 1i8m324.g6pon43ql1ogN%csampson@inetworld.net

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.



  parent reply	other threads:[~2007-12-05 10:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  3:34 DOS Options Charles H. Sampson
2007-12-05  5:15 ` Jeffrey Creem
2007-12-19 18:00   ` Charles H. Sampson
2007-12-19 19:40     ` Gautier
2007-12-19 22:59       ` Randy Brukardt
2007-12-19 23:36         ` Adam Beneschan
2007-12-20 22:15           ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-21  0:39       ` Jeffrey R. Carter
2007-12-22  0:45         ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-19 22:47     ` Randy Brukardt
2007-12-05 10:06 ` gautier_niouzes [this message]
2007-12-05 10:19 ` Stephen Leake
2007-12-05 14:51 ` Charles H. Sampson
2007-12-05 20:06 ` anon
replies disabled

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