9 ms·
Best to avoid macros if possible. use inline functions. Use global variables instead of MAX_BUF, etc
by ape4 11y ago
Best to avoid macros if possible. use inline functions. Use global variables instead of MAX_BUF, etc
- _kst_ 11y agoThe name of a variable, global or otherwise, is not a constant expression, so there are contexts in which it can't be used.
- marvy 11y agoNot always possible though. For instance, I don't think it's possible to write "assert" as a function; it has to be a macro. But things like assert are admittedly pretty rare.