structResolution{ var width =0 var height =0 } classVideoMode{ var resolution =Resolution() var interlaced =false var frameRate =0.0 var name: String? }
for index in1...5 { println("\(index) times 5 is \(index *5)") } // 1 times 5 is 5 // 2 times 5 is 10 // 3 times 5 is 15 // 4 times 5 is 20 // 5 times 5 is 25
var emptyString =""// empty string literal var anotherEmptyString =String() // initializer syntax // these two strings are both empty, and are equivalent to each other