Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Menu/MUMPS/menu.mumps
Normal file
15
Task/Menu/MUMPS/menu.mumps
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
MENU(STRINGS,SEP)
|
||||
;http://rosettacode.org/wiki/Menu
|
||||
NEW I,A,MAX
|
||||
;I is a loop variable
|
||||
;A is the string read in from the user
|
||||
;MAX is the number of substrings in the STRINGS list
|
||||
;SET STRINGS="fee fie^huff and puff^mirror mirror^tick tock"
|
||||
SET MAX=$LENGTH(STRINGS,SEP)
|
||||
QUIT:MAX=0 ""
|
||||
WRITEMENU
|
||||
FOR I=1:1:MAX WRITE I,": ",$PIECE(STRINGS,SEP,I),!
|
||||
READ:30 !,"Choose a string by its index: ",A,!
|
||||
IF (A<1)!(A>MAX)!(A\1'=A) GOTO WRITEMENU
|
||||
KILL I,MAX
|
||||
QUIT $PIECE(STRINGS,SEP,A)
|
||||
Loading…
Add table
Add a link
Reference in a new issue