nim-wiki/Tips-and-tricks.textile

13 lines
333 B
Plaintext

h1. Using reserved words as identifiers
* You can use the slanted quote string syntax if you need to use a reserved word as an identifier: <code>var `type`: int</code>
h1. Tricks with conditional compilation
<pre>
const someFeature = True
when someFeature:
const someSubFeature = true
else:
const someSubFeature = false
</pre>