1-- C49022C.ADA 2 3-- Grant of Unlimited Rights 4-- 5-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, 6-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 7-- unlimited rights in the software and documentation contained herein. 8-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making 9-- this public release, the Government intends to confer upon all 10-- recipients unlimited rights equal to those held by the Government. 11-- These rights include rights to use, duplicate, release or disclose the 12-- released technical data and computer software in whole or in part, in 13-- any manner and for any purpose whatsoever, and to have or permit others 14-- to do so. 15-- 16-- DISCLAIMER 17-- 18-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR 19-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 20-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE 21-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 22-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A 23-- PARTICULAR PURPOSE OF SAID MATERIAL. 24--* 25-- CHECK THAT NAMED NUMBER DECLARATIONS (REAL) MAY USE EXPRESSIONS 26-- WITH REALS. 27 28-- BAW 29 SEPT 80 29-- TBN 10/24/85 RENAMED FROM C4A011A.ADA. ADDED RELATIONAL 30-- OPERATORS AND NAMED NUMBERS. 31 32WITH REPORT; 33PROCEDURE C49022C IS 34 35 USE REPORT; 36 37 ADD1 : CONSTANT := 2.5 + 1.5; 38 ADD2 : CONSTANT := 2.5 + (-1.5); 39 ADD3 : CONSTANT := (-2.5) + 1.5; 40 ADD4 : CONSTANT := (-2.5) + (-1.5); 41 SUB1 : CONSTANT := 2.5 - 1.5; 42 SUB2 : CONSTANT := 2.5 - (-1.5); 43 SUB3 : CONSTANT := (-2.5) - 1.5; 44 SUB4 : CONSTANT := (-2.5) - (-1.5); 45 MUL1 : CONSTANT := 2.5 * 1.5; 46 MUL2 : CONSTANT := 2.5 * (-1.5); 47 MUL3 : CONSTANT := (-2.5) * 1.5; 48 MUL4 : CONSTANT := (-2.5) * (-1.5); 49 MLR1 : CONSTANT := 2 * 1.5; 50 MLR2 : CONSTANT := (-2) * 1.5; 51 MLR3 : CONSTANT := 2 * (-1.5); 52 MLR4 : CONSTANT := (-2) * (-1.5); 53 MLL1 : CONSTANT := 1.5 * 2 ; 54 MLL2 : CONSTANT := 1.5 * (-2); 55 MLL3 : CONSTANT :=(-1.5) * 2 ; 56 MLL4 : CONSTANT :=(-1.5) * (-2); 57 DIV1 : CONSTANT := 3.75 / 2.5; 58 DIV2 : CONSTANT := 3.75 / (-2.5); 59 DIV3 : CONSTANT := (-3.75) / 2.5; 60 DIV4 : CONSTANT := (-3.75) / (-2.5); 61 DVI1 : CONSTANT := 3.0 / 2; 62 DVI2 : CONSTANT := (-3.0) / 2; 63 DVI3 : CONSTANT := 3.0 / (-2); 64 DVI4 : CONSTANT := (-3.0) / (-2); 65 EXP1 : CONSTANT := 2.0 ** 1; 66 EXP2 : CONSTANT := 2.0 ** (-1); 67 EXP3 : CONSTANT := (-2.0) ** 1; 68 EXP4 : CONSTANT := (-2.0) ** (-1); 69 ABS1 : CONSTANT := ABS( - 3.75 ); 70 ABS2 : CONSTANT := ABS( + 3.75 ); 71 TOT1 : CONSTANT := ADD1 + SUB4 - MUL1 + DIV1 - EXP2 + ABS1; 72 LES1 : CONSTANT := BOOLEAN'POS (1.5 < 2.0); 73 LES2 : CONSTANT := BOOLEAN'POS (1.5 < (-2.0)); 74 LES3 : CONSTANT := BOOLEAN'POS ((-1.5) < (-2.0)); 75 LES4 : CONSTANT := BOOLEAN'POS (ADD2 < SUB1); 76 GRE1 : CONSTANT := BOOLEAN'POS (2.0 > 1.5); 77 GRE2 : CONSTANT := BOOLEAN'POS ((-2.0) > 1.5); 78 GRE3 : CONSTANT := BOOLEAN'POS ((-2.0) > (-1.5)); 79 GRE4 : CONSTANT := BOOLEAN'POS (ADD1 > SUB1); 80 LEQ1 : CONSTANT := BOOLEAN'POS (1.5 <= 2.0); 81 LEQ2 : CONSTANT := BOOLEAN'POS (1.5 <= (-2.0)); 82 LEQ3 : CONSTANT := BOOLEAN'POS ((-1.5) <= (-2.0)); 83 LEQ4 : CONSTANT := BOOLEAN'POS (ADD2 <= SUB1); 84 GEQ1 : CONSTANT := BOOLEAN'POS (2.0 >= 1.5); 85 GEQ2 : CONSTANT := BOOLEAN'POS ((-2.0) >= 1.5); 86 GEQ3 : CONSTANT := BOOLEAN'POS ((-2.0) >= (-1.5)); 87 GEQ4 : CONSTANT := BOOLEAN'POS (ADD1 >= SUB2); 88 EQU1 : CONSTANT := BOOLEAN'POS (1.5 = 2.0); 89 EQU2 : CONSTANT := BOOLEAN'POS ((-1.5) = 2.0); 90 EQU3 : CONSTANT := BOOLEAN'POS ((-1.5) = (-1.5)); 91 EQU4 : CONSTANT := BOOLEAN'POS (ADD1 = SUB2); 92 NEQ1 : CONSTANT := BOOLEAN'POS (1.5 /= 1.5); 93 NEQ2 : CONSTANT := BOOLEAN'POS ((-1.5) /= 1.5); 94 NEQ3 : CONSTANT := BOOLEAN'POS ((-1.5) /= (-2.0)); 95 NEQ4 : CONSTANT := BOOLEAN'POS (ADD1 /= SUB2); 96 97 98BEGIN 99 TEST("C49022C","CHECK THAT NAMED NUMBER DECLARATIONS (REAL) " & 100 "MAY USE EXPRESSIONS WITH REALS."); 101 102 IF ADD1 /= 4.0 OR ADD2 /= 1.0 OR ADD3 /= -1.0 OR ADD4 /= -4.0 THEN 103 FAILED("ERROR IN THE ADDING OPERATOR +"); 104 END IF; 105 106 IF SUB1 /= 1.0 OR SUB2 /= 4.0 OR SUB3 /= -4.0 OR SUB4 /= -1.0 THEN 107 FAILED("ERROR IN THE ADDING OPERATOR -"); 108 END IF; 109 110 IF MUL1 /= 3.75 OR MUL2 /= -3.75 OR 111 MUL3 /= -3.75 OR MUL4 /= 3.75 THEN 112 FAILED("ERROR IN THE MULTIPLYING OPERATOR *"); 113 END IF; 114 115 IF MLR1 /= 3.0 OR MLR2 /= -3.0 OR 116 MLR3 /= -3.0 OR MLR4 /= 3.0 THEN 117 FAILED("ERROR IN THE MULTIPLYING OPERATOR *"); 118 END IF; 119 120 IF MLL1 /= 3.0 OR MLL2 /= -3.0 OR MLL3 /= -3.0 OR MLL4 /= 3.0 THEN 121 FAILED("ERROR IN THE MULTIPLYING OPERATOR *"); 122 END IF; 123 124 IF DIV1 /= 1.5 OR DIV2 /= -1.5 OR DIV3 /= -1.5 OR DIV4 /= 1.5 THEN 125 FAILED("ERROR IN THE MULTIPLYING OPERATOR /"); 126 END IF; 127 128 IF DVI1 /= 1.5 OR DVI2 /= -1.5 OR DVI3 /= -1.5 OR DVI4 /= 1.5 THEN 129 FAILED("ERROR IN THE MULTIPLYING OPERATOR /"); 130 END IF; 131 132 IF EXP1 /= 2.0 OR EXP2 /= 0.5 OR EXP3 /= -2.0 OR EXP4 /= -0.5 THEN 133 FAILED("ERROR IN THE EXPONENTIATING OPERATOR"); 134 END IF; 135 136 IF ABS1 /= 3.75 OR ABS2 /= 3.75 THEN 137 FAILED("ERROR IN THE ABS OPERATOR"); 138 END IF; 139 140 IF TOT1 /= 4.00 THEN 141 FAILED("ERROR IN USE OF NAMED NUMBERS WITH OPERATORS"); 142 END IF; 143 144 IF LES1 /= 1 OR LES2 /= 0 OR LES3 /= 0 OR LES4 /= 0 THEN 145 FAILED("ERROR IN THE LESS THAN OPERATOR"); 146 END IF; 147 148 IF GRE1 /= 1 OR GRE2 /= 0 OR GRE3 /= 0 OR GRE4 /= 1 THEN 149 FAILED("ERROR IN THE GREATER THAN OPERATOR"); 150 END IF; 151 152 IF LEQ1 /= 1 OR LEQ2 /= 0 OR LEQ3 /= 0 OR LEQ4 /= 1 THEN 153 FAILED("ERROR IN THE LESS THAN EQUAL OPERATOR"); 154 END IF; 155 156 IF GEQ1 /= 1 OR GEQ2 /= 0 OR GEQ3 /= 0 OR GEQ4 /= 1 THEN 157 FAILED("ERROR IN THE GREATER THAN EQUAL OPERATOR"); 158 END IF; 159 160 IF EQU1 /= 0 OR EQU2 /= 0 OR EQU3 /= 1 OR EQU4 /= 1 THEN 161 FAILED("ERROR IN THE EQUAL OPERATOR"); 162 END IF; 163 164 IF NEQ1 /= 0 OR NEQ2 /= 1 OR NEQ3 /= 1 OR NEQ4 /= 0 THEN 165 FAILED("ERROR IN THE NOT EQUAL OPERATOR"); 166 END IF; 167 168 RESULT; 169 170END C49022C; 171