Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A small problem...
#1
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!
Reply
#2
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.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
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.
Reply
#4
I can't tell you why your program is doing whatever it is that it's doing without seeing the program. Smile
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#5
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.
Reply
#6
(Isn't programming fun?)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#7
Awww... how cute. [Image: buck.gif]
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Reply
#8
Quote:(Isn't programming fun?)

Oh yes. Just fun. :wink:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)