Difference between revisions of "MC-Basic:PRINTUSING$"
(Created page with '{{MC-Basic |SHORT FORM= PrintU$ |SYNTAX= PrintUsing$ ''<string_name>''{[ ]}'', "<format_string>";'' [''<expression>'']'';''{[''<expression>'']}* PrintUsing$ <structure_name…') |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:PRINTUSING$}} | ||
+ | |||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 4: | Line 6: | ||
|SYNTAX= | |SYNTAX= | ||
− | PrintUsing$ ''<string_name>''{[ ]}'', "<format_string>";'' ['' | + | PrintUsing$ ''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* |
− | PrintUsing$ <structure_name>->''<string_name>''{[ ]}'', "<format_string>";'' ['' | + | PrintUsing$ <structure_name>->''<string_name>''{[ ]}'', "<format_string>";'' [<''expression''>]'';''{[<''expression''>]}* |
|AVAILABILITY= | |AVAILABILITY= | ||
Line 16: | Line 18: | ||
|TYPE= | |TYPE= | ||
''< 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> |
− | '' | + | <''expression''>: Long or Double |
|RANGE= | |RANGE= | ||
Line 50: | Line 52: | ||
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[MC-Basic:CLOSE|CLOSE]] |
− | * [[ | + | * [[MC-Basic:INPUT$|INPUT$]] |
− | * [[ | + | * [[MC-Basic:LOC|LOC]] |
− | * [[ | + | * [[MC-Basic:OPEN|OPEN]] |
− | * [[ | + | * [[MC-Basic:PRINT HASH|PRINT HASH]] |
− | * [[ | + | * [[MC-Basic:PRINTUSING|PRINTUSING]] |
}} | }} |
Latest revision as of 06:46, 10 April 2017
Language: | English • 中文(简体) |
---|
Prints formatted numeric variables to a string type variable using the specified format <string>. The format string contains literal text to be printed as well as characters for formatting numeric expressions.
Short form
PrintU$
Syntax
PrintUsing$ <string_name>{[ ]}, "<format_string>"; [<expression>];{[<expression>]}*
PrintUsing$ <structure_name>-><string_name>{[ ]}, "<format_string>"; [<expression>];{[<expression>]}*
Availability
Versions 0.4.0.1 and higher
Type
< string_name >: String . The string may be a structure field also .
<format_string>: String
<expression>: Long or Double
Scope
Configuration, Task or 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.
-->Common shared Str1 as string
-->Common Shared B as Double
-->B = 33.344
-->PrintU$ Str , “B is ##.###”;B
-->?Str1
-->B IS 33.34