diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-15 12:12:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 12:12:50 +0100 |
commit | 5ccfc8ccdc4b57506e5d61dcae69e902260cfd6e (patch) | |
tree | a92d5ae160510e7a6840e812e4d6a6826ab5202a | |
parent | 122f22d1632255cf7d0539c620a30155dc84fd69 (diff) | |
parent | 1b9f37c6dc99b95a2ccee0a51535faf224b31f31 (diff) | |
download | Nim-5ccfc8ccdc4b57506e5d61dcae69e902260cfd6e.tar.gz |
Documentation only (#15968)
* Fix #15806 * https://github.com/nim-lang/Nim/pull/15968/files#r523468677
-rw-r--r-- | doc/manual.rst | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index bfcce24cf..9a4ae378d 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -8,7 +8,7 @@ Nim Manual .. contents:: - "Complexity" seems to be a lot like "energy": you can transfer it from the + "Complexity" seems to be a lot like "energy": you can transfer it from the end-user to one/some of the other players, but the total amount seems to remain pretty much constant for a given task. -- Ran @@ -313,6 +313,32 @@ it was not case-sensitive and underscores were ignored and there was not even a distinction between ``foo`` and ``Foo``. +Stropping +--------- + +If a keyword is enclosed in backticks it loses its keyword property and becomes an ordinary identifier. + +Examples + +.. code-block:: nim + var `var` = "Hello Stropping" + +.. code-block:: nim + type Type = object + `int`: int + + let `object` = Type(`int`: 9) + assert `object` is Type + assert `object`.`int` == 9 + + var `var` = 42 + let `let` = 8 + assert `var` + `let` == 50 + + const `assert` = true + assert `assert` + + String literals --------------- |