I've made this menu a long time ago, but I found the file about 2 days ago and I wanted to make it work
CLS
FOR k = 10 TO 65
LOCATE 2, k: PRINT CHR$(222)
LOCATE 23, k: PRINT CHR$(222)
LOCATE 4, k: PRINT CHR$(222)
LOCATE 20, k: PRINT CHR$(222)
NEXT
FOR k = 2 TO 23
LOCATE k, 10: PRINT CHR$(222)
LOCATE k, 65: PRINT CHR$(222)
NEXT
LOCATE 3, 35: PRINT "M A I N M E N U"
LOCATE 6, 15: PRINT "[1] First Option"
LOCATE 8, 15: PRINT "[2] Second Option"
LOCATE 10, 15: PRINT "[3] Third Option"
LOCATE 12, 15: PRINT "[4] Fourth Option"
LOCATE 14, 15: PRINT "[5] Exit"
LOCATE 21, 15: INPUT "Enter your option"; op
Now, I want to make it work, example: if I press 1 it'll automatically go to that option and so on...
Working with integer variables is faster than working with floating point variables. For efficiency reasons you could change your k and op variables into k% and op%.
To blow some live in this menu, you have a number of possibilities. In order of my personal preference:
Using
SELECT CASEUsing
IFUsing
ON GOSUBThe
DO ... LOOPmakes the program run until the user finally presses 5 to select Exit. Any invalid input will re-display the menu.