03-10-2010 07:14 AM
I've read in the help that "Variable arguments macro" (or variadic macro) is one of the C99 extensions supported in CVI 2009 (since CVI 8.5 if I' right).
So I declared the following variadic macro
#define ERR_MSG(x, ...) printf(x, ##__VA_ARGS__)
using the ## token to swallow the preceding comma in case the variable-argument list is empty (the ## token is a GCC extension of C99, but also other compilers implement it).
Unfortunately CVI doesn't and I get a compiler error if I call
ERR_MSG("Message");
with an empty variable-argument list.
Would it be possible to implement the ## token also in CVI?
03-10-2010 10:14 AM
We'll try to implement this for a future release. Thanks for the feedback.
Mert A.
National Instruments