User manual

mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
665
WordToStrWithZeros
Prototype
sub procedure WordToStrWithZeros(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 zeros.
Parameters - input: word to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
dim t as word
txt as string[5]
t = 437
WordToStrWithZeros(t, txt) ‘ txt is “00437”
Notes None.
IntToStrWithZeros
Prototype
sub procedure IntToStrWithZeros(dim input as integer, dim byref output as
string[6])
Description Converts input integer to a string. The output string is right justied and the remaining positions on the
left (if any) are lled with zeros.
Parameters - input: word to be converted
- output: destination string
Returns Nothing.
Requires Nothing.
Example
dim t as integer
txt as string[6]
t = -3276
IntToStrWithZeros(t, txt) ‘ txt is “-03276”
Notes None.