nim-wiki/Tips-and-tricks.textile

13 lines
333 B
Plaintext
Raw Normal View History

2013-01-24 17:01:51 +00:00
h2. Using reserved words as identifiers
2010-09-14 10:11:11 +00:00
* You can use the slanted quote string syntax if you need to use a reserved word as an identifier: <code>var `type`: int</code>
2013-01-24 17:01:51 +00:00
h2. Tricks with conditional compilation
2010-09-14 10:11:15 +00:00
2010-09-14 10:11:13 +00:00
<pre>
2010-09-14 10:11:11 +00:00
const someFeature = True
when someFeature:
const someSubFeature = true
else:
const someSubFeature = false
2010-09-14 10:11:13 +00:00
</pre>