Datasheet
ShortToStr
WordToStr
479
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure ShortToStr(dim input as short, dim byref output as
string[3])
Returns Nothing.
Description
Converts input short (signed byte) number to a string. The output string is right
justified and remaining positions on the left (if any) are filled with blanks.
Parameters :
-
input: short number to be converted
-
output: destination string
Requires Nothing.
Example
dim t as short
txt as string[3]
...
t = -24
ByteToStr(t, txt) ' txt is " -24" (one blank here)
Prototype
sub procedure WordToStr(dim input as word, dim byref output as
string[4])
Returns Nothing.
Description
Converts input word to a string. The output string is right justified and the
remaining positions on the left (if any) are filled with blanks.
Parameters :
-
input: word to be converted
-
output: destination string
Requires Nothing.
Example
dim t as word
txt as string[4]
...
t = 437
WordToStr(t, txt) ' txt is " 437" (two blanks here)