SW006013 Microchip Technology, SW006013 Datasheet - Page 82

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 78
rewind
Description:
Include:
Prototype:
Argument:
Remarks:
Example:
Resets the file pointer to the beginning of the file.
<stdio.h>
void rewind(FILE *stream);
stream
The function calls fseek(stream, 0L, SEEK_SET) and then clears
the error indicator for the given stream.
#include <stdio.h> /* for rewind, fopen, */
int main(void)
{
}
Output:
I have 10 cookies.
I ate 10 cookies.
FILE *myfile;
char s[] = "cookies";
int x = 10;
if ((myfile = fopen("afile", "w+")) == NULL)
else
{
}
printf("Cannot open afile\n");
fprintf(myfile, "%d %s", x, s);
printf("I have %d %s.\n", x, s);
/* set pointer to beginning of file */
rewind(myfile);
fscanf(myfile, "%d %s", &x, &s);
printf("I ate %d %s.\n", x, s);
fclose(myfile);
stream to reset the file pointer
/* fscanf, fclose,
/* fprintf, printf,
/* FILE, NULL
© 2008 Microchip Technology Inc.
*/
*/
*/

Related parts for SW006013