SW006014 Microchip Technology, SW006014 Datasheet - Page 78

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

Specifications of SW006014

Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
DS51456E-page 74
printf (Continued)
Example:
size
h modifier –
h modifier –
l modifier –
l modifier –
l modifier –
l modifier –
ll modifier –
ll modifier –
L modifier –
type
d, i
o
u
x
X
e, E
f
g, G
c
s
p
n
%
#include <stdio.h> /* for printf */
int main(void)
{
/* print a character right justified in a 3
/* character space.
printf("%3c\n", 'a');
/* print an integer, left justified (as
/* specified by the minus sign in the format */
/* string) in a 4 character space. Print a
/* second integer that is right justified in */
/* a 4 character space using the pipe (|) as */
/* a separator between the integers.
printf("%-4d|%4d\n", -4, 4);
/* print a number converted to octal in 4
/* digits.
printf("%.4o\n", 10);
used with type d, i, o, u, x, X; converts the value to a
short int or unsigned short int
used with n; specifies that the pointer points to a short
int
used with type d, i, o, u, x, X; converts the value to a
long int or unsigned long int
used with n; specifies that the pointer points to a long
int
used with c; specifies a wide character
used with type e, E, f, F, g, G; converts the value to a
double
used with type d, i, o, u, x, X; converts the value to a
long long int or unsigned long long int
used with n; specifies that the pointer points to a long
long int
used with e, E, f, g, G; converts the value to a long
double
signed int
unsigned int in octal
unsigned int in decimal
unsigned int in lowercase hexadecimal
unsigned int in uppercase hexadecimal
double in scientific notation
double decimal notation
double (takes the form of e, E or f as appropriate)
char - a single character
string
value of a pointer
the associated argument shall be an integer pointer into
which is placed the number of characters written so far.
No characters are printed.
A % character is printed
© 2008 Microchip Technology Inc.
*/
*/
*/
*/
*/
*/
*/

Related parts for SW006014