comp.lang.ada
 help / color / mirror / Atom feed
From: dale@cs.rmit.edu.au (Dale Stanbrough)
Subject: Re: Command line arguments
Date: 1998/10/12
Date: 1998-10-11T23:53:59+00:00	[thread overview]
Message-ID: <dale-1210980955430001@dale.ppp.cs.rmit.edu.au> (raw)
In-Reply-To: Pine.GSO.3.96.981011153419.29087A-100000@yeager.cs.Buffalo.EDU

Kristian J Allen  wrote:

" Hello,
     I am trying to take in arguments via the command line but am
  encountering some problems. What i'm trying to do is:
  
  > <Executable> <Argument1> <Argument2> <Argument3>
  
  Any tips are greatly appreciated.
  
  Kristian"

If you look at the Language Reference Manual (the online versions have
an index where you could look up command line arguments) you'll see...


   package Ada.Command_Line...


Use it like this...

   with Ada.Command_Line; use Ada.Command_Line;

   with Text_IO; use Text_IO;

   procedure Demo is
   begin
      for i in 1..Argument_Count loop
         put (Argument (i));
        new_line;
      end loop;
   end;

Look in the LRM for how to get the program name.

Dale




  parent reply	other threads:[~1998-10-12  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
1998-10-12  0:00   ` Tom Moran
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     ` Jeff Carter
2000-05-29  0:00     ` Robert Dewar
2000-05-30  0:00     ` Antonio Dur�n Dom�nguez
2000-05-30  0:00     ` Gautier
2000-05-31  0:00 ` Alfred Hilscher
  -- 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