comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: HELP: how to get parameters given to an exe ?
Date: 1997/03/28
Date: 1997-03-28T00:00:00+00:00	[thread overview]
Message-ID: <01bc3b63$b6bbe6e0$2d8c71a5@dhoossr.iquest.com> (raw)
In-Reply-To: Pine.SOL.3.95.970326130156.12841A-100000@java


First, you must realize that the DOS and UNIX command interpreters (Shells)
will not pass the same thing to the executable program, even for identical
command lines if the command lines contain wildcard file specifications. 
In UNIX, for example, the command line argument *.txt will be expanded to
the list of filenames in the current directory satisfying the wildcard file
specification, while the DOS command interpreter (including Windows 95 and
Windows NT) will simply pass the *.txt to the executable.

In Ada 83, since the LRM does not specify this feature, each compiler
vendor was free to do as he pleased.  The various solutions are not
portable between compilers.

In Ada95, though, the language defines the interface, and in the case of
gnat, at least, the wildcards are expanded by the compiler's implementation
of the LRM's specification.

-- 
David C. Hoos, Sr.,
http://www.dbhwww.com
http://www.ada95.com

Ingrid CHESSEL & David EXCOFFIER <linfo14@univ-savoie.fr> wrote in article
<Pine.SOL.3.95.970326130156.12841A-100000@java>...
> I'd want to code in Ada83 to following thing:
> 
> I wan't the user be able to pass parameters after the name of the exe
file
> i wrote.
> 
> e.g.:  myprog arg1 arg2 ...
> 
> like in Unix: ls -l    (i want to get this "-l") parmeter
>      or Dos:  dir a:   ( the "a:")
> 
> Is there a possibility to code this kinda thing in Ada 83, under Unix ???
> 
> (I think under Unix or dos, the code in Ada might be the same...)
> 
> TTTIA.
> 
> 
> -----------------------------------
> Ingrid CHESSEL
> David EXCOFFIER
> 
> Licence d'informatique
> 
> email: linfo14@java.univ-savoie.fr
> ----------------------------------
> 
> 




  parent reply	other threads:[~1997-03-28  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-26  0:00 HELP: how to get parameters given to an exe ? Ingrid CHESSEL & David EXCOFFIER
1997-03-26  0:00 ` Nick Roberts
1997-03-26  0:00 ` Tom Moran
1997-03-27  0:00 ` Gabriel Bereny
1997-03-27  0:00 ` Bob Klungle
1997-03-28  0:00 ` David C. Hoos, Sr. [this message]
1997-03-28  0:00   ` Robert Dewar
replies disabled

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