The #undef Statement

Sometimes you need to cause a defined name to become undefined. You do this with the #undef statement. To remove the definition of a particular name, you write the following:

#undef name

Therefore, this statement removes the definition of IPAD:

#undef IPAD

Subsequent #ifdef IPAD or #if defined (IPAD) statements evaluate to FALSE.

This concludes our discussion on the preprocessor.

Get Programming in Objective-C, Sixth Edition 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.