User manual

mikroC PRO for dsPIC
MikroElektronika
727
PrintOut Library
The mikroC PRO for dsPIC30/33 and PIC24 provides the PrintOut routine for easy data formatting and printing.
Library Dependency Tree
Library Routines
-PrintOut
PrintOut
Prototype
void PrintOut(void (*prntoutfunc)(char ch), const char *f,...);
Description PrintOut is used to format data and print them in a way dened by the user through a print handler
function.
Parameters
- prntoutfunc: print handler function
- f: format string
The f argument is a format string and may be composed of characters, escape sequences, and
format specications. Ordinary characters and escape sequences are copied to the print handler in
order in which they are interpreted. Format specications always begin with a percent sign (%) and
require additional arguments to be included in the function call.
The format string is read from left to right. The rst format specication encountered refers to the
rst argument after the f parameter and then converts and outputs it using the format specication.
The second format specication accesses the second argument after f, and so on. If there are more
arguments than format specications, the extra arguments are ignored. Results are unpredictable
if there are not enough arguments for the format specications. The format specications have the
following format:
% [ags] [width] [.precision] [{ l | L }] conversion_type
Each eld in the format specication can be a single character or a number which species a particular
format option. The conversion_type eld is where a single character species that an argument is
interpreted as a character, string, number, or pointer, as shown in the following table: