Difference between revisions of "MC-Basic:STRL$"
m (Text replace - "''<number>''" to "<''number''>") |
m (Text replace - "''<format_string>''" to "<''format_string''>") |
||
Line 4: | Line 4: | ||
|SYNTAX= | |SYNTAX= | ||
− | STRL$(<''number''>, '' | + | STRL$(<''number''>, <''format_string''>) |
|AVAILABILITY= | |AVAILABILITY= | ||
Line 14: | Line 14: | ||
''<return value>'': String<br> | ''<return value>'': String<br> | ||
<''number''>: Long, Double<br> | <''number''>: Long, Double<br> | ||
− | '' | + | <''format_string''>: String<br> |
{{Note/Important| | {{Note/Important| | ||
Line 22: | Line 22: | ||
|RANGE= | |RANGE= | ||
<''number''>: MinLong to MaxLong<br> | <''number''>: MinLong to MaxLong<br> | ||
− | '' | + | <''format_string''>: a valid sprintf() integer format |
<pre> | <pre> | ||
%d, %i - signed decimal | %d, %i - signed decimal |
Revision as of 09:34, 20 March 2014
STRL$ returns the string representation of long-type number.
Syntax
STRL$(<number>, <format_string>)
Type
<return value>: String
<number>: Long, Double
<format_string>: String
IMPORTANT | |
A double-type input is implicitly converted to long |
Range
<number>: MinLong to MaxLong
<format_string>: a valid sprintf() integer format
%d, %i - signed decimal %u - unsigned decimal %o - octal %x, %X - hexadecimal %c - unsigned char
WARNING | |
If an invalid format string is used, the behavior is undefined |
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
-->PRINT STRL$(60, "%d")
60
-->PRINT STRL$(60,"%o")
74
-->PRINT STRL$(60,"%x")
3c
-->PRINT STRL$(60,"%c")
<