User manual

mikroBasic PRO for PIC32
MikroElektronika
583
ByteToStr
Prototype
sub procedure ByteToStr(dim input as byte, dim byref output as string[3])
Description Converts input byte to a string. The output string is right justied and remaining positions on the left (if
any) are lled with blanks.
Parameters - input: byte to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 4 characters in length.
Example
dim t as byte
txt as string[3]
...
t = 24
ByteToStr(t, txt) ‘ txt is “ 24” (one blank here)
Notes None.
ShortToStr
Prototype
sub procedure ShortToStr(dim input as short, dim byref output as string[4])
Description Converts input short (signed byte) number to a string. The output string is right justied and remaining
positions on the left (if any) are lled with blanks.
Parameters - input: signed short number to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 5 characters in length.
Example
dim t as short
txt as string[4]
...
t = -24
ByteToStr(t, txt) ‘ txt is “ -24” (one blank here)
Notes None.
WordToStr
Prototype
sub procedure WordToStr(dim input as word, dim byref output as string[5])
Description Converts input word to a string. The output string is right justied and the remaining positions on the
left (if any) are lled with blanks.
Parameters - input: word to be converted
- output: destination string
Returns Nothing.
Requires Destination string should be at least 6 characters in length.
Example
dim t as word
txt as string[5]
...
t = 437
WordToStr(t, txt) ‘ txt is “ 437” (two blanks here)
Notes None.