O'Reilly logo

Programming in Objective-C, Fifth Edition by Stephen G. Kochan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10. More on Variables and Data Types

This chapter covers variable scope, initialization methods for objects, and data types in more detail.

The initialization of an object deserves some special attention, which we give it here.

We talked briefly about the scope of instance variables as well as static and local variables in Chapter 7, “More on Classes.” We talk more about static variables here and introduce the concept of global and external ones. In addition, you can give certain directives to the Objective-C compiler, to more precisely control the scope of your instance variables. We cover these directives in this chapter as well.

An enumerated data type enables you to define the name for a data type to be used only to store a specified list ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required