class SomeClass {
}
struct SomeStructure {
}
struct Resolution{
var width = 0
var height = 0
}
class VideoMode {
var resolution = Resolution()
var interlaced:Bool?
var name:String?
}
let someResolution = Resolution(width: 10,height: 20)
let someVideoMode = VideoMode()
let hd = Resolution(width: 1920,height: 1080)
var cinema = hd
cinema.width = 2048
println("\(hd.width)")
let tenEighty = VideoMode()
tenEighty.resolution = hd
tenEighty.interlaced = true
tenEighty.name = "我们"
let alsoTenEighty = tenEighty
alsoTenEighty.name = "他们"
println("tenEighty.name is \(tenEighty.name) and alsoTenEighty.name is \(alsoTenEighty.name)")