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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6706a769f2cbfa8e,start X-Google-Attributes: gid103376,public From: Ray Subject: (novice Q) Set_Exit_Status and typing Date: 1999/08/15 Message-ID: <5344E86880B8D247.560C490A62D52714.288F4D2B2373A471@lp.airnews.net>#1/1 X-Deja-AN: 513180893 Content-Transfer-Encoding: 7bit X-Orig-Message-ID: <37B755FC.B6A1358E@airmail6.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii NNTP-Posting-Time: Sun Aug 15 19:07:11 1999 Organization: The White Family 3 NNTP-Proxy-Relay: library2.airnews.net Mime-Version: 1.0 Reply-To: crwhite2@airmail6.net Abuse-Reports-To: abuse at airmail.net to report improper postings Newsgroups: comp.lang.ada Date: 1999-08-15T00:00:00+00:00 List-Id: Using Gnat and win95 I am returning the number of command line parameters to the OS. I have tried Set_Exit_Status(Argument_Count) with the expected error. I did write working code, and the Question is, how can I avoid the M := M + 1? with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Command_Line; use Ada.Integer_Text_IO, Ada.Text_IO, Ada.Command_Line; procedure EX2_9 is M: Exit_Status := 0; begin for I in 1 .. Argument_Count loop Put ("Parameter "); Put (I); Put (" is "); Put_Line (Argument(I)); New_Line; M := M + 1; End loop; Set_Exit_status (M); end EX2_9; -- Remove the numbers from my address to reply. Ray