【关键字】tcl format 格式化输出
用法 format formatString ?arg arg ...?
可以指定数据的类型,可以指定小数点的位数,对齐的方式,数值的宽度。
eg,【format "Today I buy %4d apple, the price is %6.2f." 125 2.33333】
Today I buy 125 apple, the price is 2.33.
【关键字】tcl format 格式化输出
用法 format formatString ?arg arg ...?
可以指定数据的类型,可以指定小数点的位数,对齐的方式,数值的宽度。
eg,【format "Today I buy %4d apple, the price is %6.2f." 125 2.33333】
Today I buy 125 apple, the price is 2.33.