1 |
12 |
jlechner |
-- C24003B.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 LEADING ZEROES IN INTEGRAL PARTS AND TRAILING ZEROES IN
|
26 |
|
|
-- FRACTIONAL PARTS OF FLOATING POINT LITERALS ARE IGNORED.
|
27 |
|
|
|
28 |
|
|
-- JRK 12/12/79
|
29 |
|
|
-- JRK 12/16/80
|
30 |
|
|
-- TBN 10/21/85 RENAMED FROM C24003B.TST AND FIXED LINE LENGTH.
|
31 |
|
|
-- DTN 11/12/91 DELETED SUBPART (B). CHANGED EXTENSION FROM '.TST'
|
32 |
|
|
-- TO '.ADA'.
|
33 |
|
|
|
34 |
|
|
WITH REPORT;
|
35 |
|
|
PROCEDURE C24003B IS
|
36 |
|
|
|
37 |
|
|
USE REPORT;
|
38 |
|
|
|
39 |
|
|
FL : FLOAT := 69.0E1;
|
40 |
|
|
|
41 |
|
|
BEGIN
|
42 |
|
|
TEST ("C24003B", "LEADING/TRAILING ZEROES IN " &
|
43 |
|
|
"FLOATING POINT LITERALS");
|
44 |
|
|
|
45 |
|
|
IF 000000000000000000000000000000000000000069.0E1 /= FL THEN
|
46 |
|
|
FAILED ("LEADING ZEROES IN INTEGRAL PART OF FLOATING " &
|
47 |
|
|
"POINT LITERAL NOT IGNORED");
|
48 |
|
|
END IF;
|
49 |
|
|
|
50 |
|
|
IF 69.0000000000000000000000000000000000000000E1 /= FL THEN
|
51 |
|
|
-- MIGHT RAISE NUMERIC_ERROR AT COMPILE-TIME.
|
52 |
|
|
FAILED ("TRAILING ZEROES IN FRACTIONAL PART OF " &
|
53 |
|
|
"FLOATING POINT LITERAL NOT IGNORED");
|
54 |
|
|
END IF;
|
55 |
|
|
|
56 |
|
|
IF 0000000000000000000000000000000000000000690.00000 /= FL THEN
|
57 |
|
|
FAILED ("LEADING/TRAILING ZEROES IN MANTISSA OF " &
|
58 |
|
|
"FLOATING POINT LITERAL NOT IGNORED");
|
59 |
|
|
END IF;
|
60 |
|
|
|
61 |
|
|
IF 69.0E00000000000000000000000000000000000000001 /= FL THEN
|
62 |
|
|
FAILED ("LEADING ZEROES IN EXPONENT OF FLOATING " &
|
63 |
|
|
"POINT LITERAL NOT IGNORED");
|
64 |
|
|
END IF;
|
65 |
|
|
|
66 |
|
|
IF 16#00000000000000000000000000000000000000002B.2#E1 /= FL THEN
|
67 |
|
|
FAILED ("LEADING ZEROES IN BASED FLOATING POINT " &
|
68 |
|
|
"LITERAL NOT IGNORED");
|
69 |
|
|
END IF;
|
70 |
|
|
|
71 |
|
|
IF 16#2B.20000000000000000000000000000000000000000#E1 /= FL THEN
|
72 |
|
|
FAILED ("TRAILING ZEROES IN BASED FLOATING POINT " &
|
73 |
|
|
"LITERAL NOT IGNORED");
|
74 |
|
|
END IF;
|
75 |
|
|
|
76 |
|
|
RESULT;
|
77 |
|
|
END C24003B;
|