MC-Basic:PRINTUSING$/zh-hans

From SoftMC-Wiki
< MC-Basic:PRINTUSING$
Revision as of 06:52, 10 April 2017 by Chi (talk | contribs) (Created page with "{{Languages}} == 缩写 == PrintU$ == 格式 == PrintUsing$? ''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* PrintUsing$? <stru...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: [[::MC-Basic:PRINTUSING$|English]]  • [[::MC-Basic:PRINTUSING$/zh-hans|中文(简体)‎]]


缩写

PrintU$

格式

PrintUsing$? <string_name>{[ ]}, "<format_string>"; [<expression>];{[<expression>]}*

PrintUsing$? <structure_name>-><string_name>{[ ]}, "<format_string>"; [<expression>];{[<expression>]}*

可用版本

0.4.0.1以上

描述

将数字参数打印成指定格式的字符串参数。该格式化字符串包含文本与表达式:

类型

< string_name >: String . The string may be a structure field also .
<format_string>: String
<expression>: Long or Double

取值范围

单位

默认

使用范围

Configuration, Task or Terminal

限制

小数点后只能15位有效数字,声明:

     printu “#.################”;My_Var

例子:

利用“#”符号与小数点指定最小打印个数

-->Common shared Str1 as string

-->Common Shared B as Double

-->B = 33.344
-->PrintU$ Str , “B is ##.###”;B

-->?Str1

-->B IS 33.34

可查阅