Posted: Sat Feb 05, 2005 11:03 am Post subject: exiting loop
code:
for h : 1 .. 520 by 80
for i : 1 .. 560 by 80
m += m
if c = 1 + m and whatdotcolor (40 + h, 40 + i) not= 14 and whatdotcolor (40 + h, 40 + i) not= 1 then
drawfilloval (40 + h, 40 + i, 35, 35, 1)
end if
end for
end for
i want this code to exit when the circle is drawn, so how do i do that
Sponsor Sponsor
Delos
Posted: Sat Feb 05, 2005 11:41 am Post subject: (No subject)
You could use a boolean that would be set to true after the circle is drawn, which itself would be checked at the end of each respective loop.
Viper
Posted: Sat Feb 05, 2005 1:15 pm Post subject: (No subject)
couldent u jus do
"exit when h(or i)>= wut ever
mike200015
Posted: Sat Feb 05, 2005 1:44 pm Post subject: (No subject)
Quote:
for h : 1 .. 520 by 80
for i : 1 .. 560 by 80
m += m
if c = 1 + m and whatdotcolor (40 + h, 40 + i) not= 14 and whatdotcolor (40 + h, 40 + i) not= 1 then
drawfilloval (40 + h, 40 + i, 35, 35, 1)
end if
end for
end for
cant you also jus write exit after drawfilloval?? i think that might work, im not totally sure tho.
cool dude
Posted: Sat Feb 05, 2005 2:28 pm Post subject: (No subject)
mike200015 wrote:
Quote:
for h : 1 .. 520 by 80
for i : 1 .. 560 by 80
m += m
if c = 1 + m and whatdotcolor (40 + h, 40 + i) not= 14 and whatdotcolor (40 + h, 40 + i) not= 1 then
drawfilloval (40 + h, 40 + i, 35, 35, 1)
end if
end for
end for
cant you also jus write exit after drawfilloval?? i think that might work, im not totally sure tho.
if all of that is in a loop than u could use exit otherwise u should do it like "Delos" said use a boolean and before the loop set it to false and then after the oval is drawn set it to true