I noticed that Flexscript (as of ver. 2017), doesn't support parentheses around the case values. The following example cannot be built:
#define FOO (1) // follow the best practice of C macros here #define BAR (2) int n = 2; switch (n) { case FOO: // <-- syntax error pt("foo"); pr(); break; case BAR: pt("bar"); pr(); break; }
The error is:
syntax error, unexpected '(', expecting integer or hexadecimal integer or '-'
On a related note, what is the recommended way to have multiple numeric or string constants defined and shared between multiple nodefunctions? There are Global Macros and Global Variables, but is there a way to avoid polluting the global namespace and not having to copy-paste pages of code?