Difference between revisions of "MC-Basic:STRL$"
Line 33: | Line 33: | ||
|EXAMPLE= | |EXAMPLE= | ||
− | --> | + | -->PRINT STRL$(60, "%d")<br> |
− | -->PRINT | + | 60 (singned decimal) |
− | + | -->PRINT STRL$(60,"%o")<br> | |
+ | 74 (unsigned octal) | ||
+ | -->PRINT STRL$(60,"%x")<br> | ||
+ | 3c (unsigned hexadecimal) | ||
+ | -->PRINT STRL$(60,"%c")<br> | ||
+ | < (unsigned char) | ||
|SEE ALSO= | |SEE ALSO= |
Revision as of 14:03, 19 March 2014
STRL$ returns the string representation of a number.
Syntax
STRL$(<number>, <format_string>)
Type
<return value>: String
<number>: Long, Double
<format_string>: String
Range
<number>: 0 to MaxLong
<format_string>: a valid sprintf() integer format
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
-->PRINT STRL$(60, "%d")
60 (singned decimal)
-->PRINT STRL$(60,"%o")
74 (unsigned octal)
-->PRINT STRL$(60,"%x")
3c (unsigned hexadecimal)
-->PRINT STRL$(60,"%c")
< (unsigned char)