3 -- Grant of Unlimited Rights
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
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.
25 -- CHECK THAT AN EXIT STATEMENT WITH A LOOP NAME TERMINATES EXECUTION
26 -- OF THE LOOP STATEMENT WHOSE NAME IT MENTIONS, AND OF ALL OTHER
27 -- LOOP STATEMENTS (IF ANY) INTERIOR TO THE FIRST LOOP AND ENCLOSING
28 -- THE EXIT STATEMENT.
30 -- CASE 2 : CONDITIONAL EXITS.
43 TEST
( "C57004B" , "CHECK THAT A NAMING EXIT STATEMENT TERMINATES" &
44 " EXECUTION OF THE NAMED LOOP AND OF ALL LOOPS" &
45 " SITUATED IN-BETWEEN" );
49 COUNT
: INTEGER := 0 ;
54 FOR X
IN INTEGER RANGE 1..2 LOOP
56 FOR Y
IN INTEGER RANGE 1..2 LOOP
58 COMMENT
( "BEFORE 1" );
62 COMMENT
( "INSIDE 1" );
63 EXIT LOOP1
WHEN EQUAL
(1,1) ;
64 FAILED
( "EXIT NOT OBEYED (1)" );
66 FAILED
( "OUTER EXIT NOT OBEYED (1)" );
67 EXIT WHEN EQUAL
(1,1) ;
68 FAILED
( "BOTH EXITS IGNORED (1)" );
73 COMMENT
( "BEFORE 2" );
80 FOR I
IN CHARACTER LOOP
81 COMMENT
( "INSIDE 2" );
82 EXIT LOOP2
WHEN EQUAL
(1,1) ;
83 FAILED
( "EXIT NOT OBEYED (2)" );
85 FAILED
( "OUTER EXIT NOT " &
87 EXIT WHEN EQUAL
(1,1) ;
88 FAILED
( "BOTH EXITS IGNORED " &
97 COMMENT
( "BEFORE 3" );
104 FOR I
IN BOOLEAN LOOP
105 COMMENT
( "INSIDE 3" );
107 EXIT LOOP3
WHEN EQUAL
(1,1) ;
108 FAILED
( "EXIT NOT OBEYED (3)" );
110 FAILED
( "EXIT NOT OBEYED (3BIS)" );
117 COMMENT
( "BEFORE 4" );
125 FOR I
IN INTEGER RANGE 1..10 LOOP
126 COMMENT
( "INSIDE 4" );
129 EXIT LOOP4
WHEN EQUAL
(1,1);
130 FAILED
("EXIT NOT OBEYED " &
133 FAILED
( "EXIT NOT OBEYED (4BIS)" );
140 COMMENT
( "AFTER 4" );
146 FAILED
( "MISSED FINAL EXIT" );
152 FAILED
( "WRONG FLOW OF CONTROL" );