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