tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
9
Task/Repeat-a-string/MUMPS/repeat-a-string-1.mumps
Normal file
9
Task/Repeat-a-string/MUMPS/repeat-a-string-1.mumps
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
RPTSTR(S,N)
|
||||
;Repeat a string S for N times
|
||||
NEW I
|
||||
FOR I=1:1:N WRITE S
|
||||
KILL I
|
||||
QUIT
|
||||
RPTSTR1(S,N) ;Functionally equivalent, but denser to read
|
||||
F I=1:1:N W S
|
||||
Q
|
||||
3
Task/Repeat-a-string/MUMPS/repeat-a-string-2.mumps
Normal file
3
Task/Repeat-a-string/MUMPS/repeat-a-string-2.mumps
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
;Even better (more terse)
|
||||
S x="",$P(x,"-",10)="-"
|
||||
W x
|
||||
Loading…
Add table
Add a link
Reference in a new issue