you really should use the const keyword for constants
#define num(arr) (sizeof(arr) / sizeof(arr))
I have them in the middle of the code because they are to be used together with a class defined there.
There is a bug, at least in 0017 (and not documented as fixed) in how the pre-processor scans the code
Why isn't the class defined in a separate file?