SW006013 Microchip Technology, SW006013 Datasheet - Page 63

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.
fputc
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
fputs
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Puts a character to the stream.
<stdio.h>
int fputc(int c, FILE *stream);
c
stream
Returns the character written or EOF if a write error occurs.
The function writes the character to the output stream, advances the
file-position indicator and returns the character as an unsigned char
converted to an int.
#include <stdio.h> /* for fputc, EOF, stdout */
int main(void)
{
}
Output:
T|h|i|s| |i|s| |t|e|x|t|
|
Puts a string to the stream.
<stdio.h>
int fputs(const char *s, FILE *stream);
s
stream
Returns a non-negative value if successful; otherwise, returns EOF.
The function writes characters to the output stream up to but not includ-
ing the null character.
#include <stdio.h> /* for fputs, stdout */
int main(void)
{
}
Output:
This is text
|
char *y;
char buf[] = "This is text\n";
int x;
x = 0;
for (y = buf; (x != EOF) && (*y != '\0'); y++)
{
}
char buf[] = "This is text\n";
fputs(buf,stdout);
fputs("|",stdout);
x = fputc(*y, stdout);
fputc('|', stdout);
character to be written
pointer to the open stream
string to be written
pointer to the open stream
DS51456E-page 59

Related parts for SW006013