mikroC
making it simple...
LongToStrmikroC - C Compiler for Microchip PIC microcontrollers
Prototype | void LongToStr(long number, char *output); | |
|
| |
Description | Function creates an output string out of a large signed number (numerical value of | |
| long type). Output string has fixed width of 11 characters; remaining positions on the | |
| left (if any) are filled with blanks. |
|
|
|
|
Example | long jj = |
|
| char *txt; |
|
| //... |
|
| LongToStr(jj, txt); // txt is " | |
|
|
|
Prototype | void FloatToStr(float number, char *output); |
|
|
Description | Function creates an output string out of a |
| 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, 0.ddddd; i.e. there will always be |
| 5 digits following the dot. The output string must be at least 13 characters long. |
|
|
Example | float ff = |
| char *txt; |
| //... |
| FloatToStr(ff, txt); // txt is |
|
|
Prototype | unsigned short Bcd2Dec(unsigned short bcdnum); |
|
|
Returns | Returns converted decimal value. |
|
|
Description | Converts |
|
| Example | unsigned short a; |
|
|
|
|
|
| ... |
|
|
|
|
|
| a = Bcd2Dec(0x52); // equals 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| page |
| |
|
|
|
|
| ||
MikroElektronika: Development tools - Books - Compilers | 301 | |||||
|
|
|