Lexical Macros in C/C++

The C pre-processor is a powerful tool for producing well documented, maintainable, high-performance code. However, many who program in C/C++ avoid using the C pre-processor lexical macro facility. There are many varied reasons for this reluctance, but they are all easily addressable. Wrapped within standard header files (e.g., stdlib.h) the use of macros is ubiquitous; yet many unnecessarily shy away from writing their own macros. This need not be the case. Simple rules make macro writing straightforward and safe. This session will examine precisely what the pre-processor does, using specific examples and examples, from standard C header files. In the process, we will show why judicious use of the C pre-processor, and lexical macros in general, done properly, is a powerful and safe tool for use in developing code.

Session Notes:   Color Black&White
 
 
 
Picture of Robert Gezelter, CDP
Bringing Details into Focus, Focused Innovation, Focused Solutions
RLGSC Logo
http://www.rlgsc.com
+1 (718) 463 1079