From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92cec45e19730aa6 X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Help -- Command line arguments Date: 1996/09/23 Message-ID: #1/1 X-Deja-AN: 184860770 sender: news@organon.com (news) references: organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-09-23T00:00:00+00:00 List-Id: In article smosha@most.fw.hac.com (Stephen M O'Shaughnessy) writes: > Is there a way in Ada to pass commands from the command line > when a process is started? See Ada.Command_Line ARM A.15 For example, with Ada.Command_Line; use Ada.Command_Line; with Text_Io; use Text_Io; procedure X is begin Put_Line( "My name is " & Command_Name & ", I have" & Integer'Image(Argument_Count) & " arguments."); Put_Line("They are: "); for I in 1..Argument_Count loop Put_Line(" " & Argument(I)); end loop; end; $ gnatmake x.adb $ x 1 2 3 My name is x, I have 3 arguments. They are: 1 2 3 $ /Jon -- Jon Anthony Organon Motives, Inc. 1 Williston Road, Suite 4 Belmont, MA 02178 617.484.3383 jsa@organon.com