From: Robb.Nebbe@di.epfl.ch (Robb Nebbe)
Subject: Re: GNAT and Command Line Arguments
Date: 20 Oct 1994 11:11:19 GMT
Date: 1994-10-20T11:11:19+00:00 [thread overview]
Message-ID: <1994Oct20.115433@di.epfl.ch> (raw)
In-Reply-To: 383amh$95h@hp-col.col.hp.com
In article <383amh$95h@hp-col.col.hp.com>, jimr@col.hp.com (Jim Rogers) writes:
|>
|> My current question:
|>
|> How do I write an Ada program so that I can pass file names in from the
|> UNIX command line? I am running GNAT under HPUX.
|>
The relevant functions from Ada.Command_Line are the following:
function Argument_Count return Natural;
function Argument( Number : in Positive ) return String;
function Command_Name return String;
A loop printing out all the command line arguments would be:
for Index in 1 .. Argument_Count loop
Text_IO.Put_Line( Argument( Index ));
end loop;
The interface is a little cleaner than what you get in C since
the command name, which a system may or may not provide, is not
considered as one of the arguments.
- Robb Nebbe
prev parent reply other threads:[~1994-10-20 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-19 14:32 GNAT and Command Line Arguments Jim Rogers
1994-10-19 15:56 ` Magnus Kempe
1994-10-19 16:51 ` Bob Duff
1994-10-19 17:28 ` paus
1994-10-19 17:29 ` paus
1994-10-19 17:30 ` paus
1994-10-19 17:32 ` paus
1994-10-19 18:58 ` Robert Dewar
1994-10-20 11:11 ` Robb Nebbe [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox