From 82fb275502f84e17228fc587385eeb76f195a09e Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 11 Nov 2024 11:48:21 -0800 Subject: comments --- chapter17/README.md | 2 +- chapter17/src/test/java/com/seaofnodes/simple/BrainFuckTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'chapter17') diff --git a/chapter17/README.md b/chapter17/README.md index fa268293..b7a1afd6 100644 --- a/chapter17/README.md +++ b/chapter17/README.md @@ -135,8 +135,8 @@ return i; // ERROR: Undefined name 'i' -pre-dec finalize final +oper-assign +=, -= TODO for-interator switch diff --git a/chapter17/src/test/java/com/seaofnodes/simple/BrainFuckTest.java b/chapter17/src/test/java/com/seaofnodes/simple/BrainFuckTest.java index 0c2509bf..4833483b 100644 --- a/chapter17/src/test/java/com/seaofnodes/simple/BrainFuckTest.java +++ b/chapter17/src/test/java/com/seaofnodes/simple/BrainFuckTest.java @@ -38,11 +38,12 @@ for( int pc = 0; pc < program#; pc++ ) { } else if (command == 45) { data[d]--; } else if (command == 46) { + // Output a byte; increase the output array size var old = output; output = new u8[output# + 1]; for( var i = 0; i < old#; i++ ) output[i] = old[i]; - output[old#] = data[d]; + output[old#] = data[d]; // Add the extra byte on the end } else if (command == 44) { data[d] = 42; } else if (command == 91) { -- cgit v1.2.3