From 7f7836877ea0d724e994657295faef5f64aa24c2 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 27 Jul 2024 18:56:36 -0500 Subject: [PATCH] sample-code: Add shebang comments to samples with a main() function --- sample-code/fib.cl | 1 + sample-code/fizzbuzz.cl | 3 ++- sample-code/hello.cl | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 sample-code/fib.cl mode change 100644 => 100755 sample-code/fizzbuzz.cl mode change 100644 => 100755 sample-code/hello.cl diff --git a/sample-code/fib.cl b/sample-code/fib.cl old mode 100644 new mode 100755 index 6fba537..7853f5c --- a/sample-code/fib.cl +++ b/sample-code/fib.cl @@ -1,3 +1,4 @@ +#!/usr/bin/env -S conlang -r false // Calculate Fibonacci numbers fn main() { diff --git a/sample-code/fizzbuzz.cl b/sample-code/fizzbuzz.cl old mode 100644 new mode 100755 index 364018b..7317726 --- a/sample-code/fizzbuzz.cl +++ b/sample-code/fizzbuzz.cl @@ -1,7 +1,8 @@ +#!/usr/bin/env -S conlang -r false // FizzBuzz, using the unstable variadic-`print` builtin fn main() { - fizzbuzz(10, 20) + fizzbuzz(0, 30) } // Outputs FizzBuzz for numbers between `start` and `end`, inclusive diff --git a/sample-code/hello.cl b/sample-code/hello.cl old mode 100644 new mode 100755 index 792362e..d143759 --- a/sample-code/hello.cl +++ b/sample-code/hello.cl @@ -1,3 +1,6 @@ +#!/usr/bin/env -S conlang -r false +//! Prints "Hello, world!" + fn main() { println("Hello, world!") }