From: Jeff Carter <jrcarter@acm.org>
Subject: Re: Command Line arguments
Date: 2000/05/29
Date: 2000-05-29T00:00:00+00:00 [thread overview]
Message-ID: <39329975.3C449185@acm.org> (raw)
In-Reply-To: DEqY4.9613$K4.61152@telenews.teleline.es
"Antonio Dur�n Dom�nguez" wrote:
>
> Another alternative:
>
> with Ada.Command_Line;
> with Ada.Strings.Unbounded;
> with Ada.Text_IO;
>
> use Ada.Command_Line;
> use Ada.Strings.Unbounded;
> use Ada.Text_IO;
>
> procedure Print_Args
> is
> begin
> for I in 1 .. Argument_Count loop
> Put_Line(
> "Argument " & Integer'Image(I) & ": " &
> To_String(To_Unbounded_String(Argument(I))));
> end loop;
> end Print_Args;
This is a terrible suggestion. If the idea is to store a specific
argument for some reason, then one of these ways is appropriate:
Way_1 : Unbounded_String := To_Unbounded_String (Argument (2) );
Way_2 : [constant] String := Argument (2);
If the idea is just to output the argument, as above, then one can
simply say:
Put_Line (Argument (2) );
--
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2000-05-29 0:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-28 0:00 Command Line arguments Pedro Diaz Jimenez
2000-05-28 0:00 ` Robert Dewar
2000-05-29 0:00 ` Gautier
2000-05-29 0:00 ` Antonio Dur�n Dom�nguez
2000-05-29 0:00 ` Robert Dewar
2000-05-29 0:00 ` Jeff Carter [this message]
2000-05-30 0:00 ` Gautier
2000-05-30 0:00 ` Antonio Dur�n Dom�nguez
2000-05-31 0:00 ` Alfred Hilscher
[not found] <Pine.GSO.3.96.981011153419.29087A-100000@yeager.cs.Buffalo.EDU>
1998-10-11 0:00 ` Command line arguments Matthew Heaney
1998-10-12 0:00 ` Dale Stanbrough
1998-10-12 0:00 ` Tom Moran
-- strict thread matches above, loose matches on Subject: below --
1991-04-23 20:51 Data Files David M. Onder
1991-04-25 14:37 ` Ralph Reid III
1991-04-29 22:16 ` Command line arguments Erland Sommarskog
1991-04-30 5:40 ` rharwood
1991-04-30 13:57 ` Steve Gabrilowitz
1991-05-01 23:57 ` Charles H. Sampson
1991-05-02 11:20 ` Joe Orost
1991-05-06 21:56 ` Erland Sommarskog
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox