User manual
592
mikoBasic PRO for PIC32
MikroElektronika
StrToWord
Prototype
sub function StrToWord(dim byref input as string[5]) as word
Description Converts a string to word.
Parameters - input: string to be converted
Returns Word variable.
Requires Input string is assumed to be the correct representation of a number. The conversion will end with the
rst character which is not a decimal digit.
Example
dim ww as word
main:
...
ww = StrToword(“65432”)
end.
Notes None.
Bcd2Dec
Prototype
sub function Bcd2Dec(dim bcdnum as byte) as byte
Description Converts input BCD number to its appropriate decimal representation.
Parameters - bcdnum: number to be converted
Returns Converted decimal value.
Requires Nothing.
Example
dim a, b as byte
...
a = 22
b = Bcd2Dec(a) ‘ b equals 34
Notes None.