swift3.0輸出有誤為什么呢?
let point = (8,0)
switch point{
case (0,0):
print("It's oringin.")
fallthrough
case (_,0):
print("It's on the x-axis.")
fallthrough
case (0,_):
print("It's on the y-axis.")
default:
()
}
輸出:
It's on the x-axis.
It's on the y-axis.
let point = (8,0)
switch point{
case (0,0):
print("It's oringin.")
fallthrough
case (_,0):
print("It's on the x-axis.")
fallthrough
case (0,_):
print("It's on the y-axis.")
default:
()
}
輸出:
It's on the x-axis.
It's on the y-axis.
2016-09-18
哈哈,打算用swift做一遍數(shù)據(jù)結(jié)構(gòu)習(xí)題冊(cè)的練習(xí),謝謝老師帶給我精彩的課程
2016-08-25
不對(duì)啊 ,斯坦福老頭講的Calculator里一大堆賦值語(yǔ)句做條件的,比如:
let op1Evaluation = evaluate(remainingOps)
if let operand1 = op1Evaluation.result {
let op2Evaluation = evaluate(op1Evaluation.remainingOps)
}
}
let op1Evaluation = evaluate(remainingOps)
if let operand1 = op1Evaluation.result {
let op2Evaluation = evaluate(op1Evaluation.remainingOps)
}
}
2016-08-23
波波老師真棒!要是能給我們?cè)O(shè)置一些練習(xí)來(lái)鞏固知識(shí)點(diǎn)就墜吼了
2016-08-22
swift的字符串真是太方便了,真的很適合初學(xué)者。當(dāng)初學(xué)編程的時(shí)候要是身邊的同學(xué)都用這個(gè),應(yīng)該就沒(méi)有那么多人放棄了
2016-08-22