Difference between revisions of "MC-Basic:STRD$"
m (Text replace - "''<number>''" to "<''number''>") |
m (Text replace - "''<format_string>''" to "<''format_string''>") |
||
Line 4: | Line 4: | ||
|SYNTAX= | |SYNTAX= | ||
− | STRD$(<''number''>, '' | + | STRD$(<''number''>, <''format_string''>) |
|AVAILABILITY= | |AVAILABILITY= | ||
Line 14: | Line 14: | ||
''<return value>'': String<br> | ''<return value>'': String<br> | ||
<''number''>: Double, Long<br> | <''number''>: Double, Long<br> | ||
− | '' | + | <''format_string''>: String<br> |
|RANGE= | |RANGE= | ||
<''number''>: MinDouble to MaxDouble<br> | <''number''>: MinDouble to MaxDouble<br> | ||
− | '' | + | <''format_string''>: a valid sprintf() floating point format |
<pre> | <pre> |
Revision as of 09:34, 20 March 2014
STRD$ returns the string representation of a double-type number.
Syntax
STRD$(<number>, <format_string>)
Type
<return value>: String
<number>: Double, Long
<format_string>: String
Range
<number>: MinDouble to MaxDouble
<format_string>: a valid sprintf() floating point format
%f - a non-exponential display %e, %E - an exponential display %g, %G - type of display depends on the value of the input
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
-->PRINT STRD$(45.5, "%f")
45.500000
-->PRINT STRD$(45.5,"%e")
4.550000e+01
-->PRINT STRD$(45.5,"%g")
45.5