不管是整数,还是浮点数,都可以使用下划线来分隔数字。
|
//数值可读性
let
value1 = 10_000_000_000
value2 = 1_000_000.000_000_1
var
value3:
Int
= 1_0_0_0_1
|
|
//数值可读性
let
value1 = 10_000_000_000
value2 = 1_000_000.000_000_1
var
value3:
Int
= 1_0_0_0_1
|