Menu: Difference between revisions
Content added Content deleted
Line 1,306: | Line 1,306: | ||
response = select("Which is from the three pigs", items) |
response = select("Which is from the three pigs", items) |
||
puts "you chose: >#{response}<"</lang> |
puts "you chose: >#{response}<"</lang> |
||
=={{header|Run BASIC}}== |
|||
<lang runbasic>dim choose$(5) |
|||
choose$(1) = "1 Fee Fie" |
|||
choose$(2) = "2 Huff Puff" |
|||
choose$(3) = "3 Mirror, Mirror" |
|||
choose$(4) = "4 Tick, Tock" |
|||
choose$(5) = "Exit" |
|||
[start] |
|||
print "Menu Selection" |
|||
listbox #lb,choose$(),5 |
|||
button #sel, "Accept",[select] |
|||
wait |
|||
[select] |
|||
selected$=#lb selection$() |
|||
print " " |
|||
if selected$<>"" then |
|||
print "You selected ";selected$ |
|||
else |
|||
print "No selection made" |
|||
end if |
|||
button #con, "Continue",[go2] |
|||
wait |
|||
[go2] |
|||
if selected$<>"Exit" then |
|||
cls |
|||
goto [start] |
|||
else |
|||
cls |
|||
end |
|||
end if</lang> |
|||
=={{header|Seed7}}== |
=={{header|Seed7}}== |