Computer Science Canada Loop from only one of many choices -Help please? |
Author: | sportygal1994 [ Wed Mar 17, 2010 1:53 pm ] | ||
Post subject: | Loop from only one of many choices -Help please? | ||
What is it you are trying to achieve? I am trying to have the user select a choice from many different choices, and if one specific choice is selected then I want the program to loop back to the top of the code. If any other choice is chosen I don't want it to loop back. What is the problem you are having? I can't figure out how to make it loop from one option and not all of them. Describe what you have tried to solve this problem I put "loop" at the top of the code and "end loop" right above the "end if", since it is a choice. It tells me I have a syntax error and that it was expecting the "end loop" and the "end if" to have switched places. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) I decided to post a simple version to explain my problem. I'm actually trying to program a text-based adventure game, but I think this is easier to understand. I'm trying to get it to loop back to the top after the user chooses the sad choice, but not the happy choice.
Please specify what version of Turing you are using 4.0.4c |
Author: | sportygal1994 [ Wed Mar 17, 2010 3:24 pm ] |
Post subject: | Re: Loop from only one of many choices -Help please? |
Never Mind! I figured it out! I used an exit when statement! Thanx to all who looked at it though! |
Author: | ProgrammingFun [ Fri Mar 19, 2010 2:10 pm ] |
Post subject: | RE:Loop from only one of many choices -Help please? |
I hope you realize that you can delete your post if you have solved the problem... |