Skip to content

Command_Line#

The package Command_Line allows a program to obtain the values of its arguments and to set the exit status code to be returned on normal termination.

package Ada.Command_Line
   with Preelaborate,
        Nonblocking,
        Global => in out synchronized is

   function Argument_Count             return Natural;
   function Argument(Number: Positive) return String;
   function Command_Name               return String;

   type Exit_Status is <implementation-defined integer type>;

   Success: constant Exit_Status;
   Failure: constant Exit_Status;

  procedure Set_Exit_Status(Code: Exit_Status);
end Ada.Command_Line;

Wide_Command_Line and Wide_Wide_Command_Line#

The packages Wide_Command_Line and Wide_Wide_Command_Line allow a program to obtain the values of its arguments and to set the exit status code to be returned on normal termination.

  • The specification of package Wide_Command_Line is the same as for Command_Line, except that each occurrence of String is replaced by Wide_String.
  • The specification of package Wide_Wide_Command_Line is the same as for Command_Line, except that each occurrence of String is replaced by Wide_Wide_String.