December 2013
Intermediate to advanced
132 pages
1h 58m
English
CHAPTER 4
![]()
Operators
Operators Defined
Operators are used to perform operations on values. You can do arithmetic, assignment, logical, and relational operations with operators.
Arithmetic Operators
Arithmetic operators are used to perform math on values. You can use arithmetic operators to perform addition, subtraction, multiplication, division, and modulus (the remainder from a division operation). Table 4-1 lists Objective-C’s arithmetic operators.
Table 4-1. Arithmetic Operators
Operator |
Meaning |
|---|---|
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
% |
Modulus |
An operation will look like a math problem.
1.0 + 2.0 – 3.0 * 4.0 ...Read now
Unlock full access