Changes

Jump to: navigation, search

Objective-C Flow Control with if and else

60 bytes added, 18:50, 24 November 2009
no edit summary
<hr>
<google>BUY_OBJC</google>
In the chapter titled [[Objective-C Operators and Expressions]] we looked at how to use logical expressions in Objective-C to determine whether something is ''true'' or ''false''. Since programming is largely an exercise in applying logic, much of the art of programming involves writing code that makes decisions based on one or more criteria. Such decisions define which code gets executed and, conversely, which code gets by-passed when the program is executing. This is often referred to as ''flow control'' since it controls the ''flow'' of program execution.
In this chapter we looked at the use of Objective-C ''if'' statements including if, if ... else and if ... else if ... constructs. In the next chapter of this book we will look at using the Objective-C switch statement as an alternative to more complex if statements.
 
<google>BUY_OBJC_BOTTOM</google>
<hr>

Navigation menu