Difference between revisions of "MC-Basic:PRINTUSING hash-sign"
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:PRINTUSING_hash-sign}} | ||
+ | |||
== PRINTUSING <nowiki>#</nowiki> == | == PRINTUSING <nowiki>#</nowiki> == | ||
Line 52: | Line 54: | ||
* [[MC-Basic:INPUT$|INPUT$]] | * [[MC-Basic:INPUT$|INPUT$]] | ||
* [[MC-Basic:PRINTUSING|PRINTUSING]] | * [[MC-Basic:PRINTUSING|PRINTUSING]] | ||
− | * [[ | + | * [[MC-Basic:PRINT HASH|PRINT HASH]] |
− | [[Category | + | [[Category:MC-Basic:File Management|PRINTUSING hash-sign]] |
}} | }} |
Latest revision as of 06:34, 10 April 2017
Language: | English • 中文(简体) |
---|
PRINTUSING #
Prints formatted numeric variables to a serial port using the specified format <string>. The format string contains literal text to be printed as well as characters for formatting numeric expressions. Only a single formatting string (containing text and formatting characters) followed by the expressions to print is allowed.
Short form
PrintU #
Syntax
PrintUsing #<DeviceHandle>, "<format_string>"; [<expression>];{[<expression>]}*
Availability
Since Version 3.2.1
Type
<DeviceHandle>: Long <format_string>: String <expression>: Long or Double
Range
<DeviceHandle>: 1 to 255 <string>: N/A <expression>: N/A
Scope
Configuration, Task, Terminal
Limitations
Only 15 digits after the decimal point can be displayed. The statement, printu “#.################”;My_Var,
Examples
Specify a minimum number of characters to print by using the “#” sign and decimal point. 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