User manual

669
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
StrToInt
Prototype
function StrToInt(var input: string[6]): integer;
Description Converts a string to an integer.
Parameters - input: string to be converted
Returns Integer 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
var ii: integer;
begin
ii:= StrToInt(‘-1234’);
end.
Notes None.
StrToWord
Prototype
function StrToWord(var input: string[5]): 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
var ww: word;
begin
ww:= StrToword(‘65432’);
end.
Notes None.
Bcd2Dec
Prototype
function Bcd2Dec(bcdnum : byte) : byte;
Description Converts input BCD number to its appropriate decimal representation.
Parameters - bcdnum: number to be converted
Returns Converted decimal value.
Requires Nothing.
Example
var a, b : byte;
...
a := 22;
b := Bcd2Dec(a); // b equals 34
Notes None.