Prev | Up | ____ | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


A.15 The Package Command_Line

(1)
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.
Static Semantics
(2)
The library package Ada.Command_Line has the following declaration:
(3)
       package Ada.Command_Line is
         pragma Preelaborate(Command_Line);
(4)
         function Argument_Count return Natural;
(5)
         function Argument (Number : in Positive) return String;
(6)
         function Command_Name return String;
(7)
         type Exit_Status is implementation-defined integer type;
(8)
         Success : constant Exit_Status;
         Failure : constant Exit_Status;
(9)
         procedure Set_Exit_Status (Code : in Exit_Status);
(10)
       private
         ... -- not specified by the language
       end Ada.Command_Line;

(11)
       function Argument_Count return Natural;
(12)
(13)
       function Argument (Number : in Positive) return String;
(14)
(15)
       function Command_Name return String;
(16)
(17)
(18)
       procedure Set_Exit_Status (Code : in Exit_Status);
(19)
(20)
Implementation Permissions
(21)
An alternative declaration is allowed for package Command_Line if different functionality is appropriate for the external execution environment.

(22)


Prev | Up | ____ | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12