Chapter 2. Data types, variables, and constants

 

This chapter covers
  • Storing numeric-, logic-, and text-based data
  • Creating your own data types
  • Converting values between different data types
  • Formatting values for presentation
  • Introducing the Rental Manager sample application

 

Virtually every application needs to store, represent, or process data of some kind, whether a list of calendar appointments, the current weather conditions in New York, or the high scores of a game.

Because Objective-C is a statically typed language, whenever you declare a variable, you must also specify the type of data you expect to store in it. As an example, the following variable declaration declares a variable named zombieCount, which is of type int:

int ...

Get Objective-C Fundamentals 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.