Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Process end
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Reza




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
jamonathin




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: