Computer Science Canada Error stopping a process also code help |
Author: | Copler [ Thu Nov 20, 2003 9:11 pm ] |
Post subject: | Error stopping a process also code help |
I need help with my code: Unfinished Program For one thing I cant actually stop the proc Star_Feild (a little program made to simulate travel through space) When I try navigating when I click New the StarFeild is still going and i cant figure out how to stop/pause the proc can I have some help please? ![]() PS Not Finished Yet See the attachment below |
Author: | Mazer [ Thu Nov 20, 2003 9:38 pm ] |
Post subject: | |
to exit a procedure use return |
Author: | Copler [ Thu Nov 20, 2003 9:49 pm ] |
Post subject: | I realize that |
I already know about return and alot of that stuff!! ![]() ![]() ![]() ![]() ![]() ![]() But THX! But I really meant how do you signal from outside of the proc for it to end. I tried with signal but it sais that it can only be used with in a monitor and I do need to know WHY IT DOESNT WORK!! |
Author: | Mazer [ Thu Nov 20, 2003 9:56 pm ] | ||
Post subject: | |||
for starters, you should get rid of the Run parameter. the procedure isn't run at the same time as the rest of the program, and even if it were (ie, if you made it a process), parameters are passed to procs and processes by value, not by reference. that just means once you call the function and say that Run is true, Run will always be true until the next time you call the proc/process. a solution to this could be to make Run a global variable, and make Star_Feild have no parameters. |