fork download
  1. var choice: int
  2.  
  3. loop
  4. put "Please make a selection:"
  5. put "1. Option 1"
  6. put "2. Option 2"
  7. put "3. Option 3"
  8. put "4. Option 4"
  9. put "5. Option 5"
  10. get choice
  11.  
  12. if choice = 1 then
  13. put "You have chosen Option 1"
  14. elseif choice = 2 then
  15. put "You have chosen Option 2"
  16. elseif choice = 3 then
  17. put "You have chosen Option 3"
  18. elseif choice = 4 then
  19. put "You have chosen Option 4"
  20. elseif choice = 5 then
  21. put "You have chosen Option 5"
  22. else
  23. put "Invalid choice. Please try again."
  24. end if
  25. end loop
Success #stdin #stdout #stderr 0.02s 6900KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/2YHZvs/prog:25:7: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit