-
Banned
bloody constraint errors
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.
-
It this pseudocode or actual code?
If it's actual code, what language is it?
-
-
Banned
it's ada. and i kinda fixed it. still doesn't work but no more errors.
-
Array bounds error? Does Ada start counting array indices at 0 or 1? That's a common mistake no matter what language you use.
Hard to debug this without knowing Ada and knowing what the Drawn function is doing, etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules