
-----------------------------------
Asok
Sat May 24, 2003 9:04 am

How to stop a process?
-----------------------------------
ok I've got:

process gtch
    getch (direction)
end gtch

running via:

fork gtch

I'd like to know how to halt this process. Thanks.

-----------------------------------
Dan
Sat May 24, 2003 12:55 pm


-----------------------------------
insted of using a proces i whould use:


if hasch then
    getch (direction)
end if


and put that in your main loop, but if you think you real have to use a proces i whould put some kind of if and a golabe varible that will will be set to ture or false. if it is flase it will no longer get the ch.

-----------------------------------
Tony
Sat May 24, 2003 1:00 pm


-----------------------------------
if you use Input.KeyDown you dont event have to check if anything is pressed or not... all variables are just set to false ;)

-----------------------------------
Asok
Sat May 24, 2003 1:26 pm


-----------------------------------
I tried doing the boolean thing dan, it still checks the process, I'm sure there has to be a function or a method to actually stop check it.

-----------------------------------
Tony
Sat May 24, 2003 4:39 pm


-----------------------------------
wait, what the heck are you halting there anyway? your process isn't even a loop.. it just sits there and waits for input

-----------------------------------
Asok
Sat May 24, 2003 5:22 pm


-----------------------------------
well that's the sample code...

realistically it's:

loop
fork gtch
end loop

-----------------------------------
JSBN
Sat May 24, 2003 5:52 pm


-----------------------------------
use boolean data

procedure forkyMcFork
if stop = false then
run fork
end if
end forkyMcFork

loop
forkyMcFork
if a = b then
stop = true
end if
end loop



-----------------------------------
Asok
Sat May 24, 2003 9:38 pm


-----------------------------------
JSBN, tried it before I posted. still gets hung on getch in the process...
