SW006013 Microchip Technology, SW006013 Datasheet - Page 60

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 56
fopen
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Opens a file.
<stdio.h>
FILE *fopen(const char *filename, const char *mode);
filename
mode
Returns a pointer to the open stream. If the function fails a null pointer
is returned.
Following are the types of file access:
r -
w -
be overwritten.)
a -
doesn't exist.)
rb -
wb -
will be overwritten.)
ab -
doesn't exist.)
r+ -
w+ -
existing file will be overwritten.)
a+ -
created if it doesn't exist.)
r+b or rb+ - opens an existing binary file for reading and writing.
w+b or wb+ - opens an empty binary file for reading and writing. (An
existing file will be overwritten.)
a+b or ab+ - opens a binary file for reading and appending. (A file is
created if it doesn't exist.)
#include <stdio.h> /* for fopen, fclose, */
int main(void)
{
FILE *myfile1, *myfile2;
int y;
name of the file
type of access permitted
opens an existing text file for reading
opens an empty text file for writing. (An existing file will
opens a text file for appending. (A file is created if it
opens an existing binary file for reading.
opens an empty binary file for writing. (An existing file
opens a binary file for appending. (A file is created if it
opens an existing text file for reading and writing.
opens an empty text file for reading and writing. (An
opens a text file for reading and appending. (A file is
/* printf, FILE,
/* NULL, EOF
© 2008 Microchip Technology Inc.
*/
*/

Related parts for SW006013