SW006013 Microchip Technology, SW006013 Datasheet - Page 127

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.
strcmp (Continued)
strcoll
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
strcpy
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Output:
buf1 : Where is the time?
buf2 : Where did they go?
buf3 : Why?
buf2 comes before buf1
buf1 comes before buf3
"Why?" and buf3 are equal
Compares one string to another. (See Remarks.)
<string.h>
int strcoll(const char *s1, const char *s2);
s1
s2
Using the locale-dependent rules, it returns a positive number if s1 is
greater than s2, zero if s1 is equal to s2, or a negative number if s1 is
less than s2.
Since the 16-bit compiler does not support alternate locales, this func-
tion is equivalent to strcmp.
Copy the source string into the destination string.
<string.h>
char *strcpy(char *s1, const char *s2);
s1
s2
Returns a pointer to the destination string.
All characters of s2 are copied, including the null terminating character.
If the strings overlap, the behavior is undefined.
#include <string.h> /* for strcpy, strlen */
#include <stdio.h>
int main(void)
{
char buf1[50] = "We're here";
char buf2[50] = "Where is the time?";
char buf3[50] = "Why?";
printf("buf1 : %s\n", buf1);
printf("buf2 : %s\n", buf2);
printf("buf3 : %s\n\n", buf3);
strcpy(buf1, buf2);
printf("buf1 after strcpy of buf2: \n\t%s\n\n",
buf1);
first string
second string
destination string to copy to
source string to copy from
/* for printf
DS51456E-page 123
*/

Related parts for SW006013