io.is_a_directory, octal literal constants

This commit is contained in:
2026-03-20 15:35:35 +01:00
parent efe9dfe238
commit 3efbb3ecd1
10 changed files with 86 additions and 52 deletions

View File

@@ -43,7 +43,7 @@ func part2[lines: Array] : void
for x in 1..lines->size-1
for y in 1..str.len(array.nth(lines, x))-1
if array.nth(lines, x)[y] == 'A'
let s: str = mem.alloc(5)
let s: str = mem.alloc(5) as str
s[0] = array.nth(lines, x - 1)[y - 1]
s[1] = array.nth(lines, x + 1)[y - 1]
s[2] = array.nth(lines, x + 1)[y + 1]

View File

@@ -7,7 +7,7 @@ func part1[lines: Array] : void
let largest = 0
for j in 0..str.len(line)
for k in (j+1)..str.len(line)
let s: str = mem.alloc(3)
let s: str = mem.alloc(3) as str
s[0] = line[j]
s[1] = line[k]
s[2] = 0