SW500007 Microchip Technology, SW500007 Datasheet - Page 252

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
PRINTF, VPRINTF
Synopsis
Description
The printf() function is a formatted output routine, operating on stdout. There are corresponding
routines operating on a given stream (fprintf()) or into a string buffer (sprintf()). The printf() routine
is passed a format string, followed by a list of zero or more arguments. In the format string are
conversion specifications, each of which is used to print out one of the argument list values.
a conversion, followed by an optional width specification m. The n specification is an optional
precision specification (introduced by the dot) and c is a letter specifying the type of the conversion.
in the field. Where the field width is larger than required for the conversion, blank padding is per-
formed at the left or right as specified. Where right adjustment of a numeric conversion is specified,
and the first digit of m is 0, then padding will be performed with zeroes rather than blanks. For
integer formats, the precision indicates a minimum number of digits to be output, with leading zeros
inserted to make up this number if required.
nature of the alternate format is discussed below. Not all formats have alternates. In those cases, the
presence of the hash character has no effect.
within HPD this can be forced by selecting the "Float formats in printf" selection in the options
menu. From the command line driver, use the option -LF.
argument will be taken from the list to provide that value. The types of conversion are:
Floating point - m is the total width and n is the number of digits after the decimal point. If n is
238
Each conversion specification is of the form %m.nc where the percent symbol % introduces
A minus sign (’-’) preceding m indicates left rather than right adjustment of the converted value
A hash character (#) preceding the width indicates that an alternate format is to be used. The
The floating point formats require that the appropriate floating point library is linked. From
If the character * is used in place of a decimal constant, e.g. in the format %*d, then one integer
f
#include <stdio.h>
int printf (const char * fmt, ...)
#include <stdio.h>
#include <stdarg.h>
int vprintf (const char * fmt, va_list va_arg)
Library Functions

Related parts for SW500007