Hi all,
I am not sure if this is even possible, but I couldn't find the answer anywhere, so I figured I might as well ask it here.
My question is: once you've created a menu, let's say Menu 1, which has 3 options. Option 1 get's you to another menu, option 2 as well to a different menu and option 3 stops the program.
Like this:
Menu("Menu 1", "Menu 2", A, "Menu 3," B, "Stop", C)
Now, inside of menu 2, I'd like to have the option to return to menu 1. How do I do this?
Thanks in advance.
(Excuse me if I made any grammatical or spelling mistakes, English isn't my first language.)
You'd have a Label above Menu 1. So, when you select Menu 1 from Menu 2, you go back to that Label.
Yes! This works! Finally! Thank you so much. I have been looking for this for two weeks now. Thank you!
SuperPuddi wrote:
Yes! This works! Finally! Thank you so much. I have been looking for this for two weeks now. Thank you!
You're welcome
Also, I moved this out of the forum category that's reserved for the TI-BASIC book, Programming the TI-83 Plus/TI-84 Plus.
Welcome to Cemetech, SuperPuddi; glad we were able to answer your question that fast. Would you care to
Introduce Yourself when you get a chance? Don't hesitate to ask any other TI-BASIC questions you run into.
Same subject, different question:
After I display something, I'd like to return to the first menu again. But I can't seem to. It will look like this:
Disp "something"
Lbl A
Where Lbl A is the first menu.
But this doesn't work. How do I make it work?
And yes, I will introduce myself as soon as possible. But I'm a bit busy as of right now
.
I think what's happening is you're displaying the text but then immediately going back to the menu, so you can't see the text.
This would display the text, wait for the user to press [ENTER], and then go back to the menu:
Disp "something"
Pause
Goto A
If you're an optimization freak, you could also do (thanks for the tip, Kerm):
Pause "something"
Goto A
As Pause takes in a string to display, so it works just like Disp but waits for you to press [ENTER] before moving on.
It sounds like you want this:
Code: Lbl A
Menu("MENU 1","GO TO MENU 2",B
Lbl B
Menu("MENU 2","DISP, GOTO M1",C
Lbl C
Disp "SOMETHING
Pause
Goto A
Am I correct?
Hi techboy6601,
I tried this, but after the pause, I press enter, and the program is Done. It doesn't get me back to Lbl A! Do you happen to know why?
KermMartian, I will try this right now. Thank you!
By the way, this is the most helpfull forum I have ever seen before. I have gotten two answers already, in an hour! Thank you!
That was due to a mistake on my part, sorry. Try the edited version now (just look back at my post, you'll see it's been edited)
Also: darn you copy & paste.
Basically what you need to remember is that Lbl declares a label, and Goto goes to that label.
EDIT: my brain isn't working grrr