mikroC
making it simple...
LongToStr
Prototype
void LongToStr(long number, char *output);
Description
Function creates an
long
left (if any) are filled with blanks.
Example
long jj = -3700000;
char *txt;
//...
LongToStr(jj, txt);
FloatToStr
Prototype
void FloatToStr(float number, char *output);
Description
Function creates an
contains a normalized format of the number (mantissa between 0 and 1) with sign at the
first position. Mantissa has fixed format of six digits,
5 digits following the dot. The
Example
float ff = -374.2;
char *txt;
//...
FloatToStr(ff, txt);
Bcd2Dec
Prototype
unsigned short Bcd2Dec(unsigned short bcdnum);
Returns
Returns converted decimal value.
Description
Converts 8-bit BCD numeral
Example
unsigned short a;
...
a = Bcd2Dec(0x52);
MikroElektronika: Development tools - Books - Compilers
string out of a large signed
output
type). Output string has fixed width of 11 characters; remaining positions on the
// txt is "
string out of a floating-point
output
output
// txt is "-0.37420e3"
bcdnum
// equals 52
mikroC - C Compiler for Microchip PIC microcontrollers
number
-3700000" (three blanks here)
number
0.ddddd
string must be at least 13 characters long.
to its decimal equivalent.
(numerical value of
. The output string
; i.e. there will always be
page
301
Need help?
Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?