From: jsa@alexandria (Jon S Anthony)
Subject: Re: Help -- Command line arguments
Date: 1996/09/23
Date: 1996-09-23T00:00:00+00:00 [thread overview]
Message-ID: <JSA.96Sep23145639@alexandria> (raw)
In-Reply-To: Dxy28C.7wB@most.fw.hac.com
In article <Dxy28C.7wB@most.fw.hac.com> smosha@most.fw.hac.com (Stephen M O'Shaughnessy) writes:
> Is there a way in Ada to pass commands from the command line
> when a process is started?
See Ada.Command_Line ARM A.15
For example,
with Ada.Command_Line; use Ada.Command_Line;
with Text_Io; use Text_Io;
procedure X is
begin
Put_Line(
"My name is " & Command_Name & ", I have" &
Integer'Image(Argument_Count) & " arguments.");
Put_Line("They are: ");
for I in 1..Argument_Count loop
Put_Line(" " & Argument(I));
end loop;
end;
$ gnatmake x.adb
$ x 1 2 3
My name is x, I have 3 arguments.
They are:
1
2
3
$
/Jon
--
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178
617.484.3383
jsa@organon.com
prev parent reply other threads:[~1996-09-23 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-18 0:00 Help -- Command line arguments Stephen M O'Shaughnessy
1996-09-20 0:00 ` David Shochat
1996-09-20 0:00 ` David Shochat
1996-09-20 0:00 ` Ken Garlington
1996-09-20 0:00 ` Ken Garlington
1996-09-21 0:00 ` Calius
1996-09-21 0:00 ` Calius
1996-09-21 0:00 ` David C. Hoos, Sr.
1996-09-21 0:00 ` David C. Hoos, Sr.
1996-09-23 0:00 ` Jon S Anthony [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