The Ada Joint Program Office does not guarantee the accuracy of this file, as compared with the contents of ANSI/MIL-STD-1815A-1983, the Reference Manual for the Ada Programming Language. If errors or discrepancies are found in this machine-readable version, please forward comments via the Defense Data Network (DDN) to: ACTION@AJPO.SEI.CMU.EDU or via conventional mail to Ada Information Clearinghouse 3D139 (1211 S. Fern, C-107) The Pentagon Washington, D.C. 20301-3081 ----------------------------------------------------------------------- Copyright 1980, 1982, 1983 owned by the United States Government as represented by the Under Secretary of Defense, Research and Engineering. All rights reserved. Provided that notice of copyright is included on the first page, this document may be copied in its entirety without alteration or as altered by (1) adding text that is clearly marked as an insertion; (2) shading or highlighting existing text; (3) deleting examples. Permission to publish other excerpts should be obtained from the Ada Joint Program Office, OUSDRE (R&AT), The Pentagon, Washington, DC 20301-2081, U.S.A. C. Predefined Language Environment This annex outlines the specification of the package STANDARD containing all predefined identifiers in the language. The corresponding package body is implementation-defined and is not shown. The operators that are predefined for the types declared in the package STANDARD are given in comments since they are implicitly declared. Italics are used for pseudo-names of anonymous types (such as universal_real) and for undefined information (such as implementation_defined and any_fixed_point_type). package STANDARD is type BOOLEAN is (FALSE, TRUE); -- The predefined relational operators for this type are as follows: -- function "=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "/=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "<" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "<=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function ">" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function ">=" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- The predefined logical operators and the predefined logical negation operator are as follows: -- function "and" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "or" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "xor" (LEFT, RIGHT : BOOLEAN) return BOOLEAN; -- function "not" (RIGHT : BOOLEAN) return BOOLEAN; -- The universal type universal_integer is predefined. type INTEGER is implementation_defined; -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "/=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "<" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "<=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function ">" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function ">=" (LEFT, RIGHT : INTEGER) return BOOLEAN; -- function "+" (RIGHT : INTEGER) return INTEGER; -- function "-" (RIGHT : INTEGER) return INTEGER; -- function "abs" (RIGHT : INTEGER) return INTEGER; -- function "+" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "-" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "*" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "/" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "rem" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "mod" (LEFT, RIGHT : INTEGER) return INTEGER; -- function "**" (LEFT : INTEGER; RIGHT : INTEGER) return INTEGER; -- An implementation may provide additional predefined integer types. -- It is recommended that the names of such additional types end with -- INTEGER as in SHORT_INTEGER or LONG_INTEGER. The specification of -- each operator for the type universal_integer, or for any additional -- predefined integer type, is obtained by replacing INTEGER by -- the name of the type in the specification of the corresponding -- operator of the type INTEGER, except for the right operand of the -- exponentiating operator. -- The universal type universal_real is predefined. type FLOAT is implementation_defined; -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "/=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "<" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "<=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function ">" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function ">=" (LEFT, RIGHT : FLOAT) return BOOLEAN; -- function "+" (RIGHT : FLOAT) return FLOAT; -- function "-" (RIGHT : FLOAT) return FLOAT; -- function "abs" (RIGHT : FLOAT) return FLOAT; -- function "+" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "-" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "*" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "/" (LEFT, RIGHT : FLOAT) return FLOAT; -- function "**" (LEFT : FLOAT; RIGHT : INTEGER) return FLOAT; -- An implementation may provide additional predefined floating point -- point types. It is recommended that the names of such additional -- types end with FLOAT as in SHORT_FLOAT or LONG_FLOAT. The -- specification of each operator for the type universal_real, or for -- any additional predefined floating point type, is obtained by -- replacing FLOAT by the name of the type in the specification of the -- corresponding operator of the type FLOAT. -- In addition, the following operators are predefined for universal types: -- function "*" (LEFT : universal_integer; RIGHT : universal_real) return universal_real; -- function "*" (LEFT : universal_real; RIGHT : universal_integer) return universal_real; -- function "/" (LEFT : universal_real; RIGHT : universal_integer) return universal_real; -- The type universal_fixed is predefined. The only operators declared for this type are -- function "*" (LEFT : any_fixed_point_type; RIGHT : any_fixed_point_type) return universal_fixed; -- function "/" (LEFT : any_fixed_point_type; RIGHT : any_fixed_point_type) return universal_fixed; -- The following characters form the standard ASCII character set. set. Character literals -- corresponding to control characters are not identifiers; they are indicated in italics in this definition. type CHARACTER is (nul, soh, stx, etx, eot, enq, ack, bel, bs, ht, lf, vt, ff, cr, so, si, dle, dc1, dc2, dc3, dc4, nak, syn, etb, can, em, sub, esc, fs, gs, rs, us, ' ', '!', '"', '#', '$', '%', '&', ''', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\', ']', '~', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', del); for CHARACTER use -- 128 ASCII character set without holes (0, 1, 2, 3, 4, 5, ..., 125, 126, 127); -- The predefined operators for the type CHARACTER are the same as for any enumeration type. package ASCII is -- Control characters: NUL : constant CHARACTER := nul; SOH : constant CHARACTER := soh: STX : constant CHARACTER := stx; ETX : constant CHARACTER := etx; EOT : constant CHARACTER := eot; ENQ : constant CHARACTER := enq: ACK : constant CHARACTER := ack; BEL : constant CHARACTER := bel; BS : constant CHARACTER := bs; HT : constant CHARACTER := ht; LF : constant CHARACTER := lf; VT : constant CHARACTER := vt; FF : constant CHARACTER := ff; CR : constant CHARACTER := cr; SO : constant CHARACTER := so; SI : constant CHARACTER := si; DLE : constant CHARACTER := dle; DC1 : constant CHARACTER := dc1; DC2 : constant CHARACTER := dc2; DC3 : constant CHARACTER := dc3; DC4 : constant CHARACTER := dc4; NAK : constant CHARACTER := nak; SYN : constant CHARACTER := syn; ETB : constant CHARACTER := etb; CAN : constant CHARACTER := can; EM : constant CHARACTER := em: SUB : constant CHARACTER := sub; ESC : constant CHARACTER := esc; FS : constant CHARACTER := fs; GS : constant CHARACTER := gs; RS : constant CHARACTER := rs; US : constant CHARACTER := us; DEL : constant CHARACTER := del; -- Other characters: EXCLAM : constant CHARACTER := '!'; QUOTATION : constant CHARACTER := '"'; SHARP : constant CHARACTER := '#'; DOLLAR : constant CHARACTER := '$'; PERCENT : constant CHARACTER := '%'; AMPERSAND : constant CHARACTER := '&'; COLON : constant CHARACTER := ':'; SEMICOLON : constant CHARACTER := ';'; QUERY : constant CHARACTER := '?'; AT_SIGN : constant CHARACTER := '@'; L_BRACKET: constant CHARACTER := '['; BACK_SLASH: constant CHARACTER := '\'; R_BRACKET: constant CHARACTER := ']'; CIRCUMFLEX: constant CHARACTER := '~'; UNDERLINE: constant CHARACTER := '_'; GRAVE : constant CHARACTER := '`'; L_BRACE : constant CHARACTER := '{'; BAR : constant CHARACTER := '|'; R_BRACE : constant CHARACTER := '}'; TILDE : constant CHARACTER := '~'; -- Lower case letters: LC_A : constant CHARACTER := 'a'; ... LC_Z : constant CHARACTER := 'z'; end ASCII; -- Predefined subtypes: subtype NATURAL is INTEGER range 0 .. INTEGER'LAST; subtype POSITIVE is INTEGER range 1 .. INTEGER'LAST; -- Predefined string type: type STRING is array(POSITIVE range <>) of CHARACTER; pragma PACK(STRING); -- The predefined operators for this type are as follows: -- function "=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "/=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "<" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "<=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function ">" (LEFT, RIGHT : STRING) return BOOLEAN; -- function ">=" (LEFT, RIGHT : STRING) return BOOLEAN; -- function "&" (LEFT : STRING; RIGHT : STRING) return STRING; -- function "&" (LEFT : CHARACTER; RIGHT : STRING) return STRING; -- function "&" (LEFT : STRING; RIGHT : CHARACTER) return STRING; -- function "&" (LEFT : CHARACTER; RIGHT : CHARACTER) return STRING; type DURATION is delta implementation_defined range implementation_defined; -- The predefined operators for the type DURATION are the same as for any fixed point type. -- The predefined exceptions: CONSTRAINT_ERROR : exception; NUMERIC_ERROR : exception; PROGRAM_ERROR : exception; STORAGE_ERROR : exception; TASKING_ERROR : exception; end STANDARD; Certain aspects of the predefined entities cannot be completely described in the language itself. For example, although the enumeration type BOOLEAN can be written showing the two enumeration literals FALSE and TRUE, the short-circuit control forms cannot be expressed in the language. Note: The language definition predefines the following library units: - The package CALENDAR (see 9.6) - The package SYSTEM (see 13.7) - The package MACHINE_CODE (if provided) (see 13.8) - The generic procedure UNCHECKED_DEALLOCATION (see 13.10.1) - The generic function UNCHECKED_CONVERSION (see 13.10.2) - The generic package SEQUENTIAL_IO (see 14.2.3) - The generic package DIRECT_IO (see 14.2.5) - The package TEXT_IO (see 14.3.10) - The package IO_EXCEPTIONS (see 14.5) - The package LOW_LEVEL_IO (see 14.6)