Preprocessor

Parallax Git Administrator edited this page May 10, 2017 · 3 revisions

OpenSpin's Preprocessor

The preprocessor is on by default. You can turn it off with the -p command line option.

Supported Commands

  • #define FOO
  • simple macros with no arguments, basic substitution & #ifdef checking
  • #undef
  • #ifdef FOO / #ifndef FOO
  • #else / #elseifdef FOO / #elseifndef FOO
  • #endif
  • #error message
  • #warning message
  • #include “file”

Alternative Preprocessor Mode

If you use the -a command line option, that will turn on alternative mode for the preprocessor. The difference is in how #define and #error work.

For #define, if you just define something (e.g. #define FOO or use the -D command line option) then it will not perform substitution in the code. It will just satisfy #ifdef and similar checks.

For #error, it will exit the compiler immediately after displaying the error message.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.