comp.lang.ada
 help / color / mirror / Atom feed
* (novice Q) Set_Exit_Status and typing
@ 1999-08-15  0:00 Ray
  0 siblings, 0 replies; 5+ messages in thread
From: Ray @ 1999-08-15  0:00 UTC (permalink / raw)


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






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-08-18  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5344E86880B8D247.560C490A62D52714.288F4D2B2373A471@lp.airnews. net>
1999-08-16  0:00 ` (novice Q) Set_Exit_Status and typing Matthew Heaney
1999-08-16  0:00   ` Ray
1999-08-17  0:00   ` Keith Thompson
1999-08-18  0:00   ` Robert Dewar
1999-08-15  0:00 Ray

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