Download Data Sheet - MikroElektronika

Transcript
mikoBasic PRO for PIC32
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 justified and the remaining positions on the
left (if any) are filled with zeros.
Parameters - input: signed integer number to be converted
- output: destination string
Returns
Nothing.
Requires
Destination string should be at least 7 characters in length.
Example
dim t as word
txt as string[5]
...
t = 437
WordToStrWithZeros(t, txt)
Notes
‘ txt is ‘00437’
None.
IntToStr
Prototype
sub procedure
string[6])
IntToStr(dim
input
as
integer,
dim
byref
output
as
Description Converts input integer number to a string. The output string is right justified and the remaining positions
on the left (if any) are filled with blanks.
Parameters - input: signed integer number to be converted
- output: destination string
Returns
Nothing.
Requires
Destination string should be at least 7 characters in length.
Example
dim input as integer
txt as string[6]
...
input = -4220
IntToStr(input, txt)
Notes
‘ txt is “ -4220”
None.
MikroElektronika
584