Swift Tutorial - Tutorialspoint

(backadmin) #1

Flow Diagram


Example


import Cocoa

var index = 10

do{
index = index + 1

if( index == 15 ){
break
}
println( "Value of index is \(index)")
}while index < 20

When the above code is compiled and executed, it produces the following result:


Value of index is 11
Value of index is 12
Value of index is 13
Value of index is 14
Free download pdf