Int Array 宣告方式
宣告 nSeqAvgArr 有9個 Integer陣列
並都初始化為 0x00
var nSeqAvgArr = Array( repeating: 0, count:9)
func MyFunA() { var nInArr = Array( repeating: 0, count:9) _ = MyFunB( &nInArr) print( nInArr.count ) print( nInArr[0] ) _ = MyFunC( &nInArr) print( nInArr.count ) print( nInArr[0] ) } func MyFunB(_ nInArr: inout [Int]) -> Bool { nInArr[0] = 1234 ... return false } func MyFunC(_ nInArr: [Int]) -> Bool { nInArr[0] = 1234 ... return false }
沒有留言:
張貼留言