From fc374e0108236b16b3150c0da4c01eead53abac4 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 27 Jul 2024 20:00:22 -0500 Subject: [PATCH] ascii.cl: TODO: throw out the interpreter (EVIL) --- sample-code/ascii.cl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sample-code/ascii.cl b/sample-code/ascii.cl index 7be5dbf..c4bbc0a 100755 --- a/sample-code/ascii.cl +++ b/sample-code/ascii.cl @@ -15,7 +15,7 @@ fn n_digit(n: u32) -> char { } fn in_range(num: u32, start: u32, end: u32) -> bool { - (start <= i) && (i <= end ) + (start <= num) && (num <= end ) } fn ascii() { @@ -28,8 +28,7 @@ fn ascii() { } print(" │") for col in 0..16 { - let i = row << 4 | col - print(ascii_picture(i)) + print(ascii_picture(row << 4 | col)) } println("│") }