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,2d8bc00b1190f5f9 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: GETARG in Ada? Date: 1999/02/28 Message-ID: #1/1 X-Deja-AN: 449497956 Sender: matt@mheaney.ni.net References: <7b9r2g$lha$1@netra.msu.montana.edu> NNTP-Posting-Date: Sun, 28 Feb 1999 04:52:20 PDT Newsgroups: comp.lang.ada Date: 1999-02-28T00:00:00+00:00 List-Id: Lou Glassy writes: > Question: Can anyone help me clean up this program? > No, this is not a homework assignment. > I'm an old Fortran programmer, learning Ada... My version is below. It compiles and runs using gnat v3.10p on linuxppc. with Ada.Command_Line; use Ada.Command_Line; with Ada.Text_IO; use Ada.Text_IO; procedure Test_Getarg is Count : constant Natural := Argument_Count; begin Put_Line ("number of command-line args =" & Integer'Image (Count)); for I in Integer range 1 .. Count loop Put_Line ("arg" & Integer'Image (I) & "=" & Argument (I)); end loop; end Test_Getarg;