From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: GETARG in Ada?
Date: 1999/02/28
Date: 1999-02-28T00:00:00+00:00 [thread overview]
Message-ID: <m33e3q3cxo.fsf@mheaney.ni.net> (raw)
In-Reply-To: 7b9r2g$lha$1@netra.msu.montana.edu
Lou Glassy <glassy@acheta.nervana.montana.edu> writes:
> Question: Can anyone help me clean up this program?
> No, this is not a homework assignment.
> I'm an old Fortran programmer, learning Ada...
My version is below. It compiles and runs using gnat v3.10p on
linuxppc.
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_Getarg is
Count : constant Natural := Argument_Count;
begin
Put_Line
("number of command-line args =" &
Integer'Image (Count));
for I in Integer range 1 .. Count loop
Put_Line
("arg" &
Integer'Image (I) &
"=" &
Argument (I));
end loop;
end Test_Getarg;
prev parent reply other threads:[~1999-02-28 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-27 0:00 GETARG in Ada? Lou Glassy
1999-02-27 0:00 ` bob
1999-02-27 0:00 ` David C. Hoos, Sr.
1999-02-27 0:00 ` bill
1999-02-28 0:00 ` James S. Rogers
1999-03-02 0:00 ` Stephen Leake
1999-03-02 0:00 ` nabbasi
1999-02-28 0:00 ` Matthew Heaney [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