RosettaCodeData/Task/Comments/Nim/comments.nim

16 lines
440 B
Nim
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
# Nim supports single-line comments
2016-12-05 23:44:36 +01:00
var x = 0 ## Documentation comments start with double hash characters.
2018-06-22 20:57:24 +00:00
var y = 0 ## Documentation comments are a proper part of the syntax (they're not discarded by parser, and a real part of AST).
2016-12-05 23:44:36 +01:00
2018-06-22 20:57:24 +00:00
#[
There are also multi-line comments
Everything inside of #[]# is commented.
]#
2016-12-05 23:44:36 +01:00
2018-06-22 20:57:24 +00:00
# You can also discard multiline statements:
discard """This can be considered as a "comment" too
This is multi-line"""