Lessons

lesson 02 / 15

Comments and output

A line beginning with # is a comment. Comments can also follow a statement.

print writes text to the current output stream. echo is an alias for print.

kongue
# This is a comment.
message: "Kongue is small"

main {
    print $message # The variable is expanded here.
    echo "This is also output"
}

A bare $name is useful for simple names. Braced interpolation, ${name}, is useful when the variable is next to other identifier characters or when you want to make the boundary clear.