Jump to content

Menu: Difference between revisions

add FreeBASIC
(add FreeBASIC)
Line 1,176:
 
</lang>
 
=={{header|FreeBASIC}}==
<lang freebasic>dim as string menu(1 to 4)={ "fee fie", "huff and puff", "mirror mirror", "tick tock" }
 
function menu_select( m() as string ) as string
dim as integer i, vc = 0
dim as string c
while vc<1 or vc > ubound(m)
cls
for i = 1 to ubound(m)
print i;" ";m(i)
next i
print
input "Choice? ", c
vc = val(c)
wend
return m(vc)
end function
 
print menu_select( menu() )</lang>
 
=={{header|Gambas}}==
781

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.