Posts: 43
Threads: 13
Joined: Nov 2002
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.
Any help would be greatly appreciated!
Posts: 704
Threads: 0
Joined: Dec 2002
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.
Posts: 43
Threads: 13
Joined: Nov 2002
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.
Posts: 704
Threads: 0
Joined: Dec 2002
I can't tell you why your program is doing whatever it is that it's doing without seeing the program.
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.
Posts: 43
Threads: 13
Joined: Nov 2002
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.
Posts: 704
Threads: 0
Joined: Dec 2002
(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.
Posts: 749
Threads: 4
Joined: Jun 2002
Awww... how cute.
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Posts: 43
Threads: 13
Joined: Nov 2002
Quote:(Isn't programming fun?)
Oh yes. Just fun. :wink: