SW006013 Microchip Technology, SW006013 Datasheet - Page 84

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
DS51456E-page 80
scanf (Continued)
Example:
type
d,i
o
u
x
X
e,E
f
g,G
c
s
p
n
[...]
%
#include <stdio.h> /* for scanf, printf */
int main(void)
{
}
Input:
Contents of UartIn.txt (used as stdin input for simulator):
5 T Green 300000 123-45-6789
Output:
Enter your favorite number, favorite letter,
favorite color, desired salary and SSN:
Number of items scanned = 5
Favorite number = 5, Favorite letter = T
Favorite color = Green, Desired salary = $300000.00
Social Security Number = 123-45-6789
int number, items;
char letter;
char color[30], string[30];
float salary;
printf("Enter your favorite number, "
printf("favorite color desired salary "
items = scanf("%d %c %[A-Za-z] %f %s", &number,
&letter, &color, &salary, &string);
printf("Number of items scanned = %d\n", items);
printf("Favorite number = %d, ", number);
printf("Favorite letter = %c\n", letter);
printf("Favorite color = %s, ", color);
printf("Desired salary = $%.2f\n", salary);
printf("Social Security Number = %s, ", string);
"favorite letter, ");
"and SSN:\n");
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 read so far.
No characters are scanned.
character array. Allows a search of a set of characters.
A caret (^) immediately after the left bracket ( [ ) inverts
the scanset and allows any ASCII character except
those specified between the brackets. A dash character
(-) may be used to specify a range beginning with the
character before the dash and ending the character
after the dash. A null character can not be part of the
scanset.
A % character is scanned
© 2008 Microchip Technology Inc.

Related parts for SW006013