comp.lang.ada
 help / color / mirror / Atom feed
* Command_Line question
@ 2001-12-10 20:29 Peter I. Hansen
  2001-12-10 21:25 ` Tucker Taft
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter I. Hansen @ 2001-12-10 20:29 UTC (permalink / raw)


Hello

I'm new to Ada95, and I'm trying to write a program which needs to read 
arguments from the command line. I found out that the Command_Line 
package is the way to go, but something i don't get. for example if I 
have this code :

WITH Ada.Text_IO;
WITH Ada.Command_Line;
WITH Ada.Integer_Text_IO;

PROCEDURE Test IS

Num : Natural ;
NumLength : Natural ;

BEGIN -- Test
   Ada.Integer_text_IO.Get( From => Ada.Command_Line.Argument(Number => 1),
                            Item => Num,
                            Last => NumLenght);
   Ada.Integer_Text_IO.Put(Item => Num);

END Test;

The question is : Is there a way to do this whitout the 'NumLength' 
variable, or is this just the way things work ?

/Peter




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-12-11 13:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-10 20:29 Command_Line question Peter I. Hansen
2001-12-10 21:25 ` Tucker Taft
2001-12-11  6:57   ` Anders Wirzenius
2001-12-11 12:26   ` Peter I. Hansen
2001-12-10 21:53 ` Mark Lundquist
2001-12-11 13:03 ` Marc A. Criley

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