SW006013 Microchip Technology, SW006013 Datasheet - Page 55

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
© 2008 Microchip Technology Inc.
feof
Description:
Include:
Prototype:
Argument:
Return Value:
Example:
Tests for end-of-file
<stdio.h>
int feof(FILE *stream);
stream
Returns non-zero if stream is at the end-of-file; otherwise, returns zero.
#include <stdio.h> /* for feof, fgetc, fputc, */
int main(void)
{
}
Input:
Contents of afile.txt (used as input):
This is a sentence.
Output:
This is a sentence.
if( (myfile = fopen( "afile.txt", "rb" )) == NULL )
FILE *myfile;
int y = 0;
else
{
}
printf( "Cannot open file\n" );
for (;;)
{
}
fclose( myfile );
y = fgetc(myfile);
if (feof(myfile))
fputc(y, stdout);
break;
stream to check for end-of-file
/* fopen, fclose, FILE,
/* NULL */
DS51456E-page 51
*/

Related parts for SW006013