Computer Science Canada Case Statement?? Help! |
Author: | 1212 [ Wed Jun 02, 2010 9:48 pm ] | ||
Post subject: | Case Statement?? Help! | ||
What is it you are trying to achieve? Hi, I have to create a program that has a main menu that includes the titles of three topics. The titles of each topic on the main menu must connect to a submenu. The submenu must connect to three programs. In total, there must be one main menu, three submenus, and nine subprograms. What is the problem you are having? I used the case construct method to distinguish between each topic but it is not working. Is there a limit to the amount of subprograms you can put under each case statement? in the program i put, var command:int put"Press 1 for A" put"Press 2 for B" put "Press 3 for C" get command case command of label 1: (put all the subprograms) label 2: (put subprograms.) All the programs under Label 1 worked but the programs under label 2 dont:( Please help! Describe what you have tried to solve this problem I tried using if statements instead of case construct. but it still didnt work Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using <Answer Here> ![]() ![]() |
Author: | rdrake [ Wed Jun 02, 2010 10:18 pm ] |
Post subject: | RE:Case Statement?? Help! |
Please only post the same topic once. Four is a bit much. |
Author: | Kharybdis [ Fri Jun 04, 2010 7:00 am ] |
Post subject: | RE:Case Statement?? Help! |
There's a limit.. but it's pretty big. |
Author: | musicman [ Fri Jun 04, 2010 9:30 am ] | ||
Post subject: | Re: Case Statement?? Help! | ||
heres an updated version of your code. i changed some stuff and added some.
try making all of your subprograms procedures and then just declaring the procedure after each label. hope this helps. if you have any more questions feel free to ask. from, THE MUSICMAN |