⚠️ This guide has not been actively kept up to date since before Nim 1.0. Many things are still the same, but some things have changed.

Comments

Comments in Nim begin with the hash character.

# This is a comment
echo "This is code" # This is another comment

Multiline or block comments begin with the hash and square bracket, #[, and are terminated with a closing square bracket followed by a hash, ]#. Multi line comments can be nested.

#[ This is a multi line comment
it continues until it is terminated
]#
echo "This is code"