use index assignment in existing code

This commit is contained in:
2026-03-11 15:40:05 +01:00
parent 930d7b56cc
commit 88915bbc8a
6 changed files with 67 additions and 74 deletions

View File

@@ -16,13 +16,13 @@ func main[] : i64
else if op == '<'
p = p - 1
else if op == '+'
str.set(memory, p, memory[p] + 1)
memory[p] = memory[p] + 1
else if op == '-'
str.set(memory, p, memory[p] - 1)
memory[p] = memory[p] - 1
else if op == '.'
io.print_char(memory[p])
else if op == ','
str.set(memory, p, io.read_char())
memory[p] = io.read_char()
else if op == '['
if !memory[p]
i = i + 1