Cloud No.9
11-15-2005, 08:28 AM
can anyone see why this bit of code would cause a constraint error?
while Index <=6 loop
while Drawn(Index) = Drawn(Check) loop
Drawn(check) :=Random_Int(49);
end loop;
Check:=Check+1;
if Check > 6 then
Index:=Index+1;
Check := Index+1;
end if;
end loop;
it is meant to make sure that the drawn(index) numbers don't repeat. index starts at 1 and check starts at 2.
while Index <=6 loop
while Drawn(Index) = Drawn(Check) loop
Drawn(check) :=Random_Int(49);
end loop;
Check:=Check+1;
if Check > 6 then
Index:=Index+1;
Check := Index+1;
end if;
end loop;
it is meant to make sure that the drawn(index) numbers don't repeat. index starts at 1 and check starts at 2.