-
+ 6FEF4EF76D4582051CE0717BD229C1E0BD09DC0A624786D3B73089592499B733EEB9C75B9C57E0669FD3C14F4FAB0F44D6ECF436635BD2433527CEBA5528F7D4
zfp/examples/constraint/constraint.adb
(0 . 0)(1 . 36)
10 ------------------------------------------------------------------------------
11 ------------------------------------------------------------------------------
12 -- You do not have, nor can you ever acquire the right to use, copy or --
13 -- distribute this software ; Should you use this software for any purpose, --
14 -- or copy and distribute it to anyone or in any manner, you are breaking --
15 -- the laws of whatever soi-disant jurisdiction, and you promise to --
16 -- continue doing so for the indefinite future. In any case, please --
17 -- always : read and understand any software ; verify any PGP signatures --
18 -- that you use - for any purpose. --
19 -- --
20 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
21 ------------------------------------------------------------------------------
22 ------------------------------------------------------------------------------
23
24 with Ada.Text_IO; use Ada.Text_IO;
25 with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
26
27 procedure Constraint is
28 I : Integer := 1;
29 A : array (1 .. 3) of Integer;
30 begin
31 for J in A'Range loop
32 A(J) := (J + 10) * 20;
33 end loop;
34 Put("Loop should end in constaint error.");
35 New_Line;
36 loop
37 Put(I);
38 New_Line;
39 Put(A(I));
40 I := I + 1;
41 if I > 10 then
42 exit;
43 end if;
44 end loop;
45 end Constraint;