标签:
func cal(a:Int,b:Int)->(Int,Int){ return(a+b,a-b) } let (m,n)=cal(3,1) println(m)
1 import Foundation 2 3 class hi{ 4 5 func sayhi(){ 6 7 println("Hi Jack") 8 9 } 10 11 } 12 13 var x=hi() 14 15 x.sayhi() 16 17 class hello:hi{ 18 19 var _name: String 20 21 init(name:String){ 22 23 self._name=name 24 25 } 26 27 override func sayhi() { 28 29 println("Hello \(self._name)") 30 31 } 32 33 } 34 35 var y=hello(name : "Mike") 36 37 y.sayhi()
标签:
原文地址:http://www.cnblogs.com/aezero/p/4945067.html