Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在没有“()”的数组中添加 UInt64 会产生意外的值
var arr : Any[] = [] var no : UInt64 = 9971989999 arr.append(no) println(arr)
而用“()”给出正确的值
var arr : Any[] = [] var no : UInt64 = 9971989999 arr.append("\(no)") println(arr)
为什么?
我认为它是一个 Swift 错误。您可以向 Apple 报告。它适用于 64 位 iOS,但不适用于 32 位 iOS。
println(arr) into println("\(arr)")一般来说,打印这些值不需要更改,您可以使用"\()"while 将 int 转换为字符串,同时保存到数组。
println(arr) into println("\(arr)")
"\()"