This commit is contained in:
parent
141abb7b75
commit
9c3faa449b
1 changed files with 12 additions and 0 deletions
|
|
@ -257,6 +257,18 @@ Multiline documentation comments also exist and support nesting too:
|
||||||
]##
|
]##
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also use the [discard statement](#statements-and-expressions-discard-statement) together with
|
||||||
|
[triple quoted string literals](#lexical-analysis-triple-quoted-string-literals) to create multiline comments:
|
||||||
|
|
||||||
|
```nim
|
||||||
|
discard """ You can have any Nim code text commented
|
||||||
|
out inside this with no indentation restrictions.
|
||||||
|
yes("May I ask a pointless question?") """
|
||||||
|
```
|
||||||
|
|
||||||
|
This was how multiline comments were done before version 0.13.0,
|
||||||
|
and it is used to provide specifications to [testament](testament.html#writing-unitests) test framework.
|
||||||
|
|
||||||
|
|
||||||
Identifiers & Keywords
|
Identifiers & Keywords
|
||||||
----------------------
|
----------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue