when boundChecks:
# doing something here that I want turned off when I set boundsCheck=off
How do I do this?
when defined(release):
# release stuff
else:
# compiler stuff
[The comments above were confusing until I figured out that kirbyfan64sos must have edited his comment after filwit made his.]
Unfortunately, the options like boundChecks don't seem to be exposed ... it would be nice if they were.
when compileOption("boundChecks"):
echo "yummy"
A documentation index sure would be useful.
Looking at http://nim-lang.org/docs/system.html, some other useful when tests are declaredInScope and compiles.
Yeah, like that. :-) Thanks. Unfortunately, my zoom level pushed the link to it on the doc page down below the scroll line so I didn't see it. But since it is right there on that page and I'm pretty sure I've seen it mentioned before, I have no excuse.
Now, if only the entry for when mentioned the built-in compile-time bool functions (defined, declared, declaredInScope, and compileOption) ...