Difference between revisions of "MC-Basic:STRD$"
Line 50: | Line 50: | ||
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[MC-Basic:VAL|VAL]] |
* [[MC-Basic:STR$|STR$]] | * [[MC-Basic:STR$|STR$]] | ||
* [[MC-Basic:STRL$|STRL$]] | * [[MC-Basic:STRL$|STRL$]] |
Revision as of 08:43, 22 May 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
WARNING | |
If an invalid format string is used, the behavior is undefined |
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