diff options
author | Pietro Peterlongo <pietro.peterlongo@gmail.com> | 2022-10-28 22:24:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 16:24:51 -0400 |
commit | 9c3faa449b5ff4856106792f0fa8aa80a7cb5708 (patch) | |
tree | 41bb325e7df55a56f6939328a66cf64085121c7d | |
parent | 141abb7b75e1dcea8c138ba625831cce7e314e4a (diff) | |
download | Nim-9c3faa449b5ff4856106792f0fa8aa80a7cb5708.tar.gz |
add back discard as a way to do multiline comments, see #12352 (#20688)
-rw-r--r-- | doc/manual.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/manual.md b/doc/manual.md index 8431eba3d..bd5307003 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -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 ---------------------- |