Computer Science Canada how to continue a program after a loop |
Author: | kasi [ Tue Nov 20, 2007 8:09 pm ] | ||
Post subject: | how to continue a program after a loop | ||
i have figured out the button, but i just have one more problem after the loop the "Enter the number of the first die you have rolled:" doesn't get outputted, how would i program it so the "Enter the number of the first die you have rolled:" get outputted
|
Author: | rdrake [ Tue Nov 20, 2007 9:24 pm ] | ||
Post subject: | RE:how to continue a program after a loop | ||
|
Author: | Nick [ Tue Nov 20, 2007 10:10 pm ] |
Post subject: | RE:how to continue a program after a loop |
looK up return |
Author: | Tony [ Wed Nov 21, 2007 12:36 am ] | ||||
Post subject: | RE:how to continue a program after a loop | ||||
I think GUI.ProcessEvent return false unless GUI.Quit (or equivalent) is called. This is an arbitrary convention, to accommodate
structure. rdrake's code is equivalent to the above, since exit when condition is the same as
So you could break out of the loop by setting the exit flag with GUI.Quit in your di2 procedure. Though keep in mind that as soon as you exit that loop, your GUI will stop working since nothing is monitoring it. |
Author: | Nick [ Wed Nov 21, 2007 1:07 am ] | ||
Post subject: | RE:how to continue a program after a loop | ||
another thing is
so u got 2 exit commands |
Author: | Mazer [ Wed Nov 21, 2007 7:03 am ] | ||
Post subject: | RE:how to continue a program after a loop | ||
Why the fuck? EDIT: Oh hey, I found a way to do it with 3 exit commands
Gotta keep your options open in the early stages, right? |