Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Flatten-a-list/QBasic/flatten-a-list.basic
Normal file
11
Task/Flatten-a-list/QBasic/flatten-a-list.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
sString$ = "[[1], 2, [[3,4], 5], [[[]]], [[[6]]], 7, 8 []]"
|
||||
|
||||
FOR siCount = 1 TO LEN(sString$)
|
||||
IF INSTR("[] ,", MID$(sString$, siCount, 1)) = 0 THEN
|
||||
sFlatter$ = sFlatter$ + sComma$ + MID$(sString$, siCount, 1)
|
||||
sComma$ = ", "
|
||||
END IF
|
||||
NEXT siCount
|
||||
|
||||
PRINT "["; sFlatter$; "]"
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue