类型转换类型转换数字类型转换通过使用类型来执行: var x: int32 = 1.int32 # 与调用int32(1)相同 y: int8 = int8('a') # 'a' == 97'i8 z: float = 2.5 # int(2.5)向下取整为2 sum: int = int(x) + int(y) + int(z) # sum == 100