SW006013 Microchip Technology, SW006013 Datasheet - Page 87

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.
sprintf
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
sscanf
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Prints formatted text to a string
<stdio.h>
int sprintf(char *s, const char *format, ...);
s
format
...
Returns the number of characters stored in s excluding the terminating
null character.
The format argument has the same syntax and use that it has in
printf.
#include <stdio.h> /* for sprintf, printf */
int main(void)
{
}
Output:
Number of characters printed to string buffer = 25
String = Print this string 1 time
Scans formatted text from a string
<stdio.h>
int sscanf(const char *s, const char *format, ...);
s
format
...
Returns the number of items successfully converted and assigned. If
no items are assigned, a 0 is returned. EOF is returned if an input error
is encountered before the first conversion.
The format argument has the same syntax and use that it has in
scanf.
char sbuf[100], s[]="Print this string";
int x = 1, y;
char a = '\n';
y = sprintf(sbuf, "%s %d time%c", s, x, a);
printf("Number of characters printed to "
printf("String = %s\n", sbuf);
"string buffer = %d\n", y);
storage string for output
format control string
optional arguments
storage string for input
format control string
optional arguments
DS51456E-page 83

Related parts for SW006013