Qbasicnews.com

Full Version: A small problem...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have one main menu, which lists different options. If one of the options is chosen, the user is taken to another menu of sorts. The user picks an option, the necessary code is run for that option, and then it returns to the actual main menu. However, when the user picks an option from that menu once again, it automatically goes to the previous sub visited (when it shouldn't)

The variable used for the choice of the menu option is simply 'choice', and it is not declared globally.

I tried to explain this as easy as possible...let me know if you need further clarification. Big Grin

Any help would be greatly appreciated!
i.e., is that where the value of "CHOICE" gets set and does execution return to your MAIN routine after choosing a main menu item? If so, the value of "CHOICE" should remain intact. I suspect you're going to need to post your code.
It's not that difficult, exactly why I can't understand why it's doing this.

a) Basically, the user is presented with a main menu.
b) The user selects an option, and taken a sub
c) The code that the sub contains is executed, and at the end, the user is taken back to the main menu.
d) At this point (and I just realized it), the user would select the option to end the program (I simply use the END command, and not SYSTEM)

This only happens WHEN the option to end the program is selected; choosing any other option does not matter.
I can't tell you why your program is doing whatever it is that it's doing without seeing the program. Smile
Thanks for your willingness to help--it seems that I figured out the problem. As it turned out, I did forget to include the END command when the program was supposed to end.
(Isn't programming fun?)
Awww... how cute. [Image: buck.gif]
Quote:(Isn't programming fun?)

Oh yes. Just fun. :wink: