diff options
| author | Andreas Grois <andi@grois.info> | 2025-12-04 00:13:00 +0100 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2025-12-04 00:13:00 +0100 |
| commit | 1edd26243bde242f0de78c947c94cf3d73e6070b (patch) | |
| tree | 6ff0f51ecabc4fcf96f1b5428dbec492a4638429 /day2/part1.TXT | |
| parent | fd5a331808b6bec13ca4a7cdeee192da6c456184 (diff) | |
Day2
Diffstat (limited to 'day2/part1.TXT')
| -rw-r--r-- | day2/part1.TXT | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/day2/part1.TXT b/day2/part1.TXT new file mode 100644 index 0000000..82b0cda --- /dev/null +++ b/day2/part1.TXT @@ -0,0 +1,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\
|
