Routines created with preprocessor macros call for a few unique considerations. The following rules and examples pertain to using the preprocessor in C++. If you're using a different language or preprocessor, adapt the rules to your situation.
Even if your language doesn't have a macro preprocessor, you can build your own. For details, see Building Your Own Programming Tools.
Fully parenthesize macro expressions. Because macros and their arguments are expanded into code, be careful that they expand the way you want them to. One common problem lies in creating a macro like this one:
Example 7-10. C++ Example of a Macro That Doesn't Expand Properly
#define Cube( a ) a*a*a
If you pass this macro nonatomic ...