-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Consts defined by the compiler
Christian Witts edited this page Apr 5, 2018
·
4 revisions
The following three lists are compiled from: Nim/compiler/platform.nim and Nim/compiler/extccomp.nim
One can use some name from them like:
when defined(Windows):
doSomething()
DOS
Windows
OS2
Linux
MorphOS
SkyOS
Solaris
Irix
NetBSD
FreeBSD
OpenBSD
AIX
PalmOS
QNX
Amiga
Atari
Netware
MacOS
MacOSX
Haiku
VxWorks
JS
NimrodVM
Standalone
i386
m68k
alpha
powerpc
powerpc64
sparc
vm
ia64
amd64
mips
arm
js
nimrodvm
avr
-
vcc
Microsoft's Visual C++ -
gcc
Gnu C -
llvm_gcc
LLVM-GCC compiler -
icc
Intel C++ compiler -
clang
Clang compiler -
bcc
Borland C Compiler -
dmc
Digital Mars C Compiler -
wcc
Watcom C Compiler -
tcc
Tiny C Compiler -
pcc
Pelles C Compiler -
ucc
Generic UNIX C compiler
Also remember about how to access the compiler options:
when compileOption("boundChecks"): # d:release should disable this.
if i > q.high: # x < q.low is taken care by the Natural parameter
raise newException(IndexError, "Bla has less than " & $(i+1) & " elements.")
discard
TODO: List them here and how to correctly access the more complex ones.
Intro
Getting Started
- Install
- Docs
- Curated Packages
- Editor Support
- Unofficial FAQ
- Nim for C programmers
- Nim for Python programmers
- Nim for TypeScript programmers
- Nim for D programmers
- Nim for Java programmers
- Nim for Haskell programmers
Developing
- Build
- Contribute
- Creating a release
- Compiler module reference
- Consts defined by the compiler
- Debugging the compiler
- GitHub Actions/Travis CI/Circle CI/Appveyor
- GitLab CI setup
- Standard library and the JavaScript backend
Misc