Process end
Author |
Message |
Reza
|
Posted: Wed Jun 01, 2005 7:34 pm Post subject: Process end |
|
|
hey guys,
i was wondering if you can end a process after you have forked it.
for example you have a process with an infinite loop and you've forked it.
how do u stop it later when u want? ![Rolling Eyes Rolling Eyes](http://compsci.ca/v3/images/smiles/icon_rolleyes.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
jamonathin
![](http://compsci.ca/v3/uploads/user_avatars/57683465145f851a43dd9a.gif)
|
Posted: Wed Jun 01, 2005 7:40 pm Post subject: (No subject) |
|
|
Yeah, just use a variable to tell the loop when to end, like this program. Juss press any key to stop it.
code: | var a : int := 0
process thing
loop
drawfilloval (Rand.Int (0, maxx), Rand.Int (0, maxy), 10, 10, Rand.Int (1, maxcolor))
exit when a = 1
end loop
end thing
fork thing
loop
if hasch then
a := 1
exit
end if
end loop
|
|
|
|
|
|
![](images/spacer.gif) |
|
|