comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter I. Hansen" <pih@oek.dk>
Subject: Command_Line question
Date: Mon, 10 Dec 2001 21:29:32 +0100
Date: 2001-12-10T21:29:32+01:00	[thread overview]
Message-ID: <3C151B2C.4010601@oek.dk> (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




             reply	other threads:[~2001-12-10 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-10 20:29 Peter I. Hansen [this message]
2001-12-10 21:25 ` Command_Line question 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
replies disabled

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