Scaly comes with a standard library which among other stuff contains a function
which prints a string to the standard output (which is the output of your terminal,
or a debug console, depending on the environment in which your program was started into).
The function has the name print
and accepts a string, returning nothing to the caller.
We use it to write up the inevitable Hello World program in Scaly:
print "Hello World!"
When you run that program you will notice that no line break is printed. The reason is that we did not include one in our string literal, and the print function does not print a line break by itself. We correct that by inserting a line break literally:
print "Hello World! "
Scaly can contain all kinds of whitespace literally. If you don’t like to span string literals more than one line for readability reasons or want more compact code, you can use an escape sequence as well:
print "Hello World!\n"