Chapter 13
The Preprocessor
Objective-C comes with a powerful preprocessor that can simplify the input of repetitive code into a program. For example, the preprocessor can be used to import header files, which are used to make class definitions available to other parts of the application. The preprocessor is also used to define macros, which can work both as constants or to perform simple substitution based on arguments.
Despite all its functionality, however, the preprocessor may be the source of numerous programming pitfalls if you are not careful with its usage. Due to the fact that the substitutions performed in the preprocessing stag are not immediately checked by the compiler, there is the possibility of introducing faulty code by ...
Get Objective-C Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.