with Ada.Command_Line, Ada.Integer_Text_IO, Ada.Text_IO;

procedure List_Arguments is
   use Ada.Command_Line, Ada.Integer_Text_IO, Ada.Text_IO;
begin
   Put ("Number of arguments: ");
   Put (Argument_Count, Width => 1);
   New_Line;
   Put_Line ("The arguments are:");
   Put_Line (" name) '" & Command_Name & "'");
   for I in 1 .. Argument_Count loop
      Put (I, Width => 5);
      Put_Line (") '" & Argument (I) & "'");
   end loop;
   Put_Line (Standard_Error,
             "This message is sent to standard error.");
end List_Arguments;

