Difference between revisions of "MC-Basic:PRINTUSING hash-sign/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Languages}} == PRINTUSING <nowiki>#</nowiki> == {{MC-Basic == 缩写 == PrintU <nowiki>#</nowiki> == 格式 == <nowiki>PrintUsing #<DeviceHandle>, "<format_string>"; [<...")
 
 
Line 1: Line 1:
{{Languages}}
+
{{Languages|MC-Basic:PRINTUSING_hash-sign}}
  
 
== PRINTUSING <nowiki>#</nowiki> ==
 
== PRINTUSING <nowiki>#</nowiki> ==
  
  
{{MC-Basic
+
 
 
== 缩写 ==
 
== 缩写 ==
 
PrintU <nowiki>#</nowiki>
 
PrintU <nowiki>#</nowiki>
Line 59: Line 59:
  
 
[[Category:MC-Basic:File Management|PRINTUSING hash-sign]]
 
[[Category:MC-Basic:File Management|PRINTUSING hash-sign]]
}}
 

Latest revision as of 06:42, 10 April 2017

语言: English  • 中文(简体)‎

PRINTUSING #

缩写

PrintU #


格式

PrintUsing #<DeviceHandle>, "<format_string>"; [<expression>];{[<expression>]}*

可用版本

3.2.1以上

描述

利用指定格式字符串将格式化参数输出到串口中。格式化字符串包含字面意思的文本与格式化字符,以格式化数字表达式。每一个表达式只能包含一个格式化字符串(包括文本和格式化字符。

类型

<DeviceHandle>: Long <format_string>: String <expression>: Long or Double

范围

<DeviceHandle>: 1 to 255 <string>: N/A <expression>: N/A

单位

默认

可用范围

Configuration, Task, Terminal

限制

小数点后,只能打印15位有效数字。声明:“#.################”;My_Var,

例子

利用“#”指定最小输出字符个数。符号与小数点: B = 33.344 PrintU #1 “B is ##.##”;B ‘prints B IS 33.34

PrintU #1 “B is ##.####”;B ‘prints B IS 33.3440

PrintU #1 “B is ##.##^^^^”;B ‘prints B IS 3.33e+01

可查阅