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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access