SW006014 Microchip Technology, SW006014 Datasheet - Page 97

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

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
© 2008 Microchip Technology Inc.
atexit (Continued)
int main(void)
{
}
void good_msg(void)
{
}
void bad_msg(void)
{
}
void end_msg(void)
{
}
Input:
With contents of UartIn.txt (used as stdin input for simulator):
5
Output:
Enter your favorite number: 5
Good Choice
That's an excellent number
Now go count something
Input:
With contents of UartIn.txt (used as stdin input for simulator):
42
Output:
Enter your favorite number: 42
42!?
That's an awful number
Now go count something
int number;
atexit(end_msg);
printf("Enter your favorite number:");
scanf("%d", &number);
printf(" %d\n", number);
if (number == 5)
{
}
else
{
}
printf("That's an excellent number\n");
printf("That's an awful number\n");
printf("Now go count something\n");
printf("Good Choice\n");
atexit(good_msg);
exit(0);
printf("%d!?\n", number);
atexit(bad_msg);
exit(0);
DS51456E-page 93

Related parts for SW006014