Choosing Names
In Chapter 2, “Programming in Objective-C,” you used several variables to store integer (int) values. For example, you used the variable sum in Program 2.4 to store the result of the addition of the two integers 50 and 25.
The Objective-C language allows you to store data types other than just integers in variables as well, as long as the proper declaration for the variable is made before it is used in the program. Variables can be used to store floating-point numbers, characters, and even objects (or, more precisely, references to objects).
The rules for forming names are quite simple: They must begin with a letter or underscore (_), and they can be followed by any combination of letters (uppercase or lowercase), underscores, ...
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