Ti_Basic_Tutorials

Advanced Menu1

Apr 30th, 2012
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Repeat 0, While 1. //both can be used, use what feels right for you.
  2. Disp "TEST PROGRAM
  3. Disp "1.SHOW A
  4. Disp "2.SHOW B
  5. Disp "3.EXIT
  6. Repeat Ans
  7. getKey->K
  8. End
  9. /////////////////////
  10. //the user will push "1" (getkey code 92) or "2" (getKey value 93) To
  11. //pick the menu option they want
  12. //Repeat is best used here, because as long as Ans = 0 (No key pressed)
  13. //Then the loop will continue.
  14. ////////////////////
  15.  
  16. If K= 92
  17. //Key press of 1
  18. Pause "A"
  19. If K=93
  20. //Key Press of 2
  21. Pause "B"
  22. If K=94
  23. Return
  24. End
  25. //This will loop until the user breaks the program or 3 is pressed because
  26. //the Repeat 0 or While 1 at the top makes it an infinite loop
Advertisement
Add Comment
Please, Sign In to add comment