pythonpython
不支持
nimc++
支持.和c++相似
使用整數(int/int8/int16/int32/64/uint/uint8/uint16/uint32/uint32)內置方法(由system引入)ui
let value:int64 = 99999 echo 「this value is: $#」% $value
result:
this value is: 99999
使用strformat進行格式化(由strformat引入&操做符)this
let value:int64 = 99999 echo 「this value is: $#」% &」{value<:可選格式文字列>}」
- 沒有格式文字列:
this value is: 99999- 共10位,小數位2位,右對齊進行格式化echo 「this value is: $#」% &」{value:>10.2}」result:this value is: 0099999.00