sample-code: Add shebang comments to samples with a main() function

This commit is contained in:
John 2024-07-27 18:56:36 -05:00
parent b2733aa171
commit 7f7836877e
3 changed files with 6 additions and 1 deletions

1
sample-code/fib.cl Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env -S conlang -r false
// Calculate Fibonacci numbers // Calculate Fibonacci numbers
fn main() { fn main() {

3
sample-code/fizzbuzz.cl Normal file → Executable file
View File

@ -1,7 +1,8 @@
#!/usr/bin/env -S conlang -r false
// FizzBuzz, using the unstable variadic-`print` builtin // FizzBuzz, using the unstable variadic-`print` builtin
fn main() { fn main() {
fizzbuzz(10, 20) fizzbuzz(0, 30)
} }
// Outputs FizzBuzz for numbers between `start` and `end`, inclusive // Outputs FizzBuzz for numbers between `start` and `end`, inclusive

3
sample-code/hello.cl Normal file → Executable file
View File

@ -1,3 +1,6 @@
#!/usr/bin/env -S conlang -r false
//! Prints "Hello, world!"
fn main() { fn main() {
println("Hello, world!") println("Hello, world!")
} }