Difference between revisions of "MC-Basic:PRINTUSING$/zh-hans"
(Created page with "{{Languages}} == 缩写 == PrintU$ == 格式 == PrintUsing$? ''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* PrintUsing$? <stru...") |
|||
Line 1: | Line 1: | ||
− | {{Languages}} | + | {{Languages|MC-Basic:PRINTUSING$}} |
Line 6: | Line 6: | ||
== 格式 == | == 格式 == | ||
− | PrintUsing$? ''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* | + | PrintUsing$? ''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* |
− | PrintUsing$? <structure_name>->''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* | + | PrintUsing$? <structure_name>->''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* |
== 可用版本 == | == 可用版本 == | ||
− | 0.4.0.1以上 | + | 0.4.0.1以上 |
== 描述 == | == 描述 == | ||
Line 17: | Line 17: | ||
== 类型 == | == 类型 == | ||
− | ''< string_name >'': String . The string may be a structure field also .<br> | + | ''< string_name >'': String . The string may be a structure field also .<br> |
− | <''format_string''>: String<br> | + | <''format_string''>: String<br> |
− | <''expression''>: Long or Double | + | <''expression''>: Long or Double |
== 取值范围 == | == 取值范围 == | ||
Line 40: | Line 40: | ||
利用“#”符号与小数点指定最小打印个数<br> | 利用“#”符号与小数点指定最小打印个数<br> | ||
− | -->Common shared Str1 as string | + | -->Common shared Str1 as string |
− | -->Common Shared B as Double | + | -->Common Shared B as Double |
− | -->B = 33.344<br> | + | -->B = 33.344<br> |
− | -->PrintU$ Str , “B is ##.###”;B | + | -->PrintU$ Str , “B is ##.###”;B |
− | -->?Str1 | + | -->?Str1 |
− | -->B IS 33.34 | + | -->B IS 33.34 |
== 可查阅 == | == 可查阅 == |
Latest revision as of 06:53, 10 April 2017
语言: | English • 中文(简体) |
---|
缩写
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