Menu: Difference between revisions
Content added Content deleted
(→{{header|Clojure}}: fix verification and return type; add example invocation) |
|||
Line 450: | Line 450: | ||
print "You chose: $a\n";</lang> |
print "You chose: $a\n";</lang> |
||
=={{header|PL/I}}== |
|||
<lang PL/I> |
|||
test: proc options (main); |
|||
declare menu(4) character(100) varying static initial ( |
|||
'fee fie', 'huff and puff', 'mirror mirror', 'tick tock'); |
|||
declare (i, k) fixed binary; |
|||
do i = lbound(menu,1) to hbound(menu,1); |
|||
put skip edit (trim(i), ': ', menu(i) ) (a); |
|||
end; |
|||
put skip list ('please choose an item number'); |
|||
get list (k); |
|||
if k >= lbound(menu,1) & k <= hbound(menu,1) then |
|||
put skip edit ('you chose ', menu(k)) (a); |
|||
else |
|||
put skip list ('Could not find your phrase'); |
|||
end test; |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |
||