Posted: Thu Dec 15, 2011 7:45 am Post subject: How do you exit or continue in Turing?
For example I want to ask the user
put "Do you want to play?"
get answer
I want the program to exit if the user says no and continue on if the user says yes.
How do I do this?
Sponsor Sponsor
Zren
Posted: Thu Dec 15, 2011 10:40 am Post subject: RE:How do you exit or continue in Turing?
To 'exit' is to reach the end of your code. That involves breaking out of any loops you may be in. Alternatively, if you're not dealing within a main loop, you can instead check if the input is the yes condition and call the rest of the code in a procedure. The no condition wouldn't call the code, thus skipping it and continuing on to the end of code.
Amarylis
Posted: Thu Dec 15, 2011 5:08 pm Post subject: Re: How do you exit or continue in Turing?
So I'm assuming that you want to use a loop after that, so what I would do is this