Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Menu/BBC-BASIC/menu.basic
Normal file
21
Task/Menu/BBC-BASIC/menu.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
DIM list$(4)
|
||||
list$() = "fee fie", "huff and puff", "mirror mirror", "tick tock"
|
||||
selected$ = FNmenu(list$(), "Please make a selection: ")
|
||||
PRINT selected$
|
||||
END
|
||||
|
||||
DEF FNmenu(list$(), prompt$)
|
||||
LOCAL index%, select$
|
||||
IF SUM(list$()) = "" THEN = ""
|
||||
REPEAT
|
||||
CLS
|
||||
FOR index% = 0 TO DIM(list$() ,1)
|
||||
IF list$(index%)<>"" PRINT ; index% ":", list$(index%)
|
||||
NEXT
|
||||
PRINT prompt$ ;
|
||||
INPUT "" select$
|
||||
index% = VAL(select$)
|
||||
IF select$<>STR$(index%) index% = -1
|
||||
IF index%>=0 IF index%<=DIM(list$() ,1) IF list$(index%)="" index% = -1
|
||||
UNTIL index%>=0 AND index%<=DIM(list$(), 1)
|
||||
= list$(index%)
|
||||
Loading…
Add table
Add a link
Reference in a new issue