summaryrefslogtreecommitdiff
path: root/day2/part1.TXT
blob: 82b0cdabf73c255ad6bb2d6373e0de8a8aae152a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\START92\
\COMMENT=Single file dated Wed Dec  3 21:00:53 20
\NAME=part1
\FILE=day2.part1.92f
(str)
Func
Local p1,p2,dimstr,curr,result
0\->\result
1\->\p1
dim(str)\->\dimstr

While p1<dimstr
 inString(str,",",p1)\->\p2
 If p2\<=\0 Then
  dimstr+1\->\p2
 EndIf
 mid(str,p1,p2-p1)\->\curr
 p2+1\->\p1
 result+invids(curr)\->\result
EndWhile
Return result
EndFunc

\STOP92\