SW006014 Microchip Technology, SW006014 Datasheet - Page 91
![C COMPILER MPLAB FOR PIC24 MCU](/photos/9/32/93245/sw006014_sml.jpg)
SW006014
Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet
1.SW006014.pdf
(246 pages)
Specifications of SW006014
Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
- Current page: 91 of 246
- Download datasheet (3Mb)
© 2008 Microchip Technology Inc.
vfprintf
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Prints formatted data to a stream using a variable length argument list.
<stdio.h>
<stdarg.h>
int vfprintf(FILE *stream, const char *format,
va_list ap);
stream
format
ap
Returns number of characters generated or a negative number if an
error occurs.
The format argument has the same syntax and use that it has in
printf.
To access the variable length argument list, the ap variable must be ini-
tialized by the macro va_start and may be reinitialized by additional
calls to va_arg. This must be done before the vfprintf function is
called. Invoke va_end after the function returns. For more details see
stdarg.h.
#include <stdio.h>
#include <stdarg.h> /* for va_start,
FILE *myfile;
void errmsg(const char *fmt, ...)
{
}
int main(void)
{
}
Output:
Contents of afile.txt
Error: The letter 'a' is not an integer value.
Error: Requires 3 or more characters.
va_list ap;
va_start(ap, fmt);
vfprintf(myfile, fmt, ap);
va_end(ap);
int num = 3;
if ((myfile = fopen("afile.txt", "w")) == NULL)
else
{
}
fclose(myfile);
errmsg("Error: The letter '%c' is not %s\n", 'a',
printf("Cannot open afile.txt\n");
errmsg("Error: Requires %d%s%c", num,
"an integer value.");
" or more characters.", '\n');
pointer to the open stream
format control string
pointer to a list of arguments
/* for vfprintf, fopen, */
/* fclose, printf,
/* FILE, NULL
/* va_list, va_end
DS51456E-page 87
*/
*/
*/
*/
Related parts for SW006014
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1014-5.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.8VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-4.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.85VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: