SW006013 Microchip Technology, SW006013 Datasheet - Page 88

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 84
sscanf (Continued)
Example:
tmpfile
Description:
Include:
Prototype:
Return Value:
Remarks:
Example:
#include <stdio.h> /* for sscanf, printf */
int main(void)
{
}
Output:
Number of items scanned = 4
Favorite number = 5
Favorite letter = T
Favorite color = green
Desired salary = $3000000.00
Creates a temporary file
<stdio.h>
FILE *tmpfile(void)
Returns a stream pointer if successful; otherwise, returns a NULL
pointer.
tmpfile creates a file with a unique filename. The temporary file is
opened in w+b (binary read/write) mode. It will automatically be
removed when exit is called; otherwise the file will remain in the
directory.
#include <stdio.h> /* for tmpfile, printf, */
int main(void)
{
}
Output:
Temporary file was created
char s[] = "5 T green 3000000.00";
int number, items;
char letter;
char color[10];
float salary;
items = sscanf(s, "%d %c %s %f", &number, &letter,
printf("Number of items scanned = %d\n", items);
printf("Favorite number = %d\n", number);
printf("Favorite letter = %c\n", letter);
printf("Favorite color = %s\n", color);
printf("Desired salary = $%.2f\n", salary);
FILE *mytempfile;
if ((mytempfile = tmpfile()) == NULL)
else
printf("Cannot create temporary file");
printf("Temporary file was created");
&color, &salary);
/* FILE, NULL
© 2008 Microchip Technology Inc.
*/

Related parts for SW006013