Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Menu/True-BASIC/menu.basic
Normal file
20
Task/Menu/True-BASIC/menu.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
DIM menu$(4)
|
||||
MAT READ menu$
|
||||
DATA "fee fie", "huff and puff", "mirror mirror", "tick tock"
|
||||
|
||||
FUNCTION sel$(choices$())
|
||||
IF UBOUND(choices$) - LBOUND(choices$) = 0 THEN LET sel$ = ""
|
||||
LET ret$ = ""
|
||||
DO
|
||||
FOR i = LBOUND(choices$) TO UBOUND(choices$)
|
||||
PRINT i; ": "; choices$(i)
|
||||
NEXT i
|
||||
PRINT prompt$;
|
||||
INPUT index
|
||||
IF index <= UBOUND(choices$) AND index >= LBOUND(choices$) THEN LET ret$ = choices$(index)
|
||||
LOOP WHILE ret$ = ""
|
||||
LET sel$ = ret$
|
||||
END FUNCTION
|
||||
|
||||
PRINT sel$(menu$())
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue