Changes

Jump to: navigation, search

Swift Flow Control

No change in size, 18:06, 1 February 2016
m
Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>"
<google>BUY_IOS8</google>
== The do ... while loop ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
It is often helpful to think of the do ... while loop as an inverted while loop. The while loop evaluates an expression before executing the code contained in the body of the loop. If the expression evaluates to false on the first check then the code is not executed. The do ... while loop, on the other hand, is provided for situations where you know that the code contained in the body of the loop will always need to be executed at least once. For example, you may want to keep stepping through the items in an array until a specific item is found. You know that you have to at least check the first item in the array to have any hope of finding the entry you need. The syntax for the do ... while loop is as follows:

Navigation menu