September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,45 +1,10 @@
DIM parseMe AS STRING
parseMe = "Hello,How,Are,You,Today"
NewList MyStrings.s()
DIM tmpLng1 AS INTEGER, tmpLng2 AS INTEGER, parsedCount AS INTEGER
tmpLng2 = 1
parsedCount = -1
For i=1 To 5
AddElement(MyStrings())
MyStrings()=StringField("Hello,How,Are,You,Today",i,",")
Next i
'count number of tokens
DO
tmpLng1 = INSTR(tmpLng2, parseMe, ",")
IF tmpLng1 THEN
parsedCount = parsedCount + 1
tmpLng2 = tmpLng1 + 1
ELSE
IF tmpLng2 < (LEN(parseMe) + 1) THEN parsedCount = parsedCount + 1
EXIT DO
END IF
LOOP
IF parsedCount > -1 THEN
REDIM parsed(parsedCount) AS STRING
tmpLng2 = 1
parsedCount = -1
'parse
DO
tmpLng1 = INSTR(tmpLng2, parseMe, ",")
IF tmpLng1 THEN
parsedCount = parsedCount + 1
parsed(parsedCount) = MID$(parseMe, tmpLng2, tmpLng1 - tmpLng2)
tmpLng2 = tmpLng1 + 1
ELSE
IF tmpLng2 < (LEN(parseMe) + 1) THEN
parsedCount = parsedCount + 1
parsed(parsedCount) = MID$(parseMe, tmpLng2)
END IF
EXIT DO
END IF
LOOP
PRINT parsed(0);
FOR L0 = 1 TO parsedCount
PRINT "."; parsed(L0);
NEXT
END IF
ForEach MyStrings()
Print(MyStrings()+".")
Next