From a8b8a91c79e478784ee54c3fdbfe1f5d0cf33ebf Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Jul 2024 05:13:52 -0500 Subject: [PATCH] sample-code: print->println to match interpreter behavior --- sample-code/fib.cl | 4 ++-- sample-code/fizzbuzz.cl | 2 +- sample-code/hello.cl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sample-code/fib.cl b/sample-code/fib.cl index 81239e5..3276186 100644 --- a/sample-code/fib.cl +++ b/sample-code/fib.cl @@ -2,10 +2,10 @@ fn main() { for num in 0..=30 { - print("fib(", num, ") = ", fib_iterative(num)) + println("fib(", num, ") = ", fib_iterative(num)) } for num in 0..=30 { - print("fib(", num, ") = ", fib(num)) + println("fib(", num, ") = ", fib(num)) } } diff --git a/sample-code/fizzbuzz.cl b/sample-code/fizzbuzz.cl index ce5a94e..364018b 100644 --- a/sample-code/fizzbuzz.cl +++ b/sample-code/fizzbuzz.cl @@ -7,7 +7,7 @@ fn main() { // Outputs FizzBuzz for numbers between `start` and `end`, inclusive fn fizzbuzz(start: i128, end: i128) { for x in start..=end { - print(if x % 15 == 0 { + println(if x % 15 == 0 { "FizzBuzz" } else if 0 == x % 3 { "Fizz" diff --git a/sample-code/hello.cl b/sample-code/hello.cl index a375fad..792362e 100644 --- a/sample-code/hello.cl +++ b/sample-code/hello.cl @@ -1,3 +1,3 @@ fn main() { - print("Hello, world!") + println("Hello, world!") }