Computer Science Canada How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Author: | lightswift69 [ Mon Feb 02, 2015 10:52 am ] | ||
Post subject: | How do I get options to appear and when I press it how do I get a button that can take you back to the options? | ||
What is it you are trying to achieve? I am trying to achieve on you you can get get the options and then have a button to go back with and how you can exit output screen when you press"3", i am confused :s What is the problem you are having? The problem is that I want the options to appear but they are not, and if they do how do make a button that can take you back to the options, also want to make the output screen to exit when I press "3" but I cant make it do that :/ Describe what you have tried to solve this problem I tried everything I can think of from loops to statements but I cant get it to work, I even tried locate command. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) procedure heading drawline (1, 345, 637, 345, 7) locate (1, 36) put "The Menus" locate (2, 15) put "This program will output the choice that the person chooses." end heading heading var answer : int procedure choices loop put "" put "" put "" put "" put "" put "Choose an option: " put " 1. To see my favourite class " put " 2. To see my favourite animal" put " 3. To exit" get answer if answer = 1 then put "Science" put "Back" elsif answer = 2 then put "Tiger" end if exit when answer = 3 end loop end choices
Please specify what version of Turing you are using <Answer Here> |
Author: | Insectoid [ Mon Feb 02, 2015 11:20 am ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Step one would be to actually use your choices procedure. |
Author: | lightswift69 [ Mon Feb 02, 2015 11:39 am ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
I did use that ![]() |
Author: | Insectoid [ Mon Feb 02, 2015 12:08 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Not in the code you posted you didn't. You created the procedure but you never call it. |
Author: | lightswift69 [ Mon Feb 02, 2015 12:41 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
What do you do after that ![]() |
Author: | Insectoid [ Mon Feb 02, 2015 1:00 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Call the procedure. You did it with heading, so I assume you know how. |
Author: | lightswift69 [ Mon Feb 02, 2015 1:29 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Did that too, the thing I want to know is how you can make the options show up, when you click a option the screen clears and opens that option. |
Author: | Insectoid [ Mon Feb 02, 2015 1:34 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
cls will clear the screen. |
Author: | lightswift69 [ Mon Feb 02, 2015 1:39 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Ah okay where do you put the cls before the options? also how do I make the options come on the output screen? I tried the locate command, didn't work:P |
Author: | lightswift69 [ Mon Feb 02, 2015 3:29 pm ] |
Post subject: | RE:How do I get options to appear and when I press it how do I get a button that can take you back to the options? |
Also what is screen flow? |