Page 214


studdet.marks = 98 studdet.markssecured()

println(studdet.marks) println(studdet.result) println(studdet.present) println(studdet.subject) println(studdet.stname) When we run the above program using playground, we get the following result: 98 true false Swift Protocols Swift

Mutating Method Requirements protocol daysofaweek { mutating func print() }

enum days: daysofaweek { case sun, mon, tue, wed, thurs, fri, sat mutating func print() { switch self { case sun: self = sun println("Sunday") case mon: self = mon println("Monday") case tue: self = tue println("Tuesday") case wed: 202

​Quick is really a powerful and intuitive programming language for macOS, iOS, watchOS and tvO...  


Read more
Read more
Similar to
Popular now
Just for you