Hello world
# hello.spicy
module hello;
print "Hello, world!";
- every Spicy source file needs to declare the module it belongs to
- global statements are run once when the module is initialized
Compile and run this code with
$ spicyc -j hello.spicy
Hello, world!
Here we have used Spicy's
spicyc
executable to compile and immediately run the source file hello.spicy
.