SW006014 Microchip Technology, SW006014 Datasheet - Page 17
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: 17 of 246
- Download datasheet (3Mb)
2.3
© 2008 Microchip Technology Inc.
<ASSERT.H> DIAGNOSTICS
The header file
errors in programs. By using the assert statement in critical locations where certain
conditions should be true, the logic of the program may be tested.
Assertion testing may be turned off without removing the code by defining NDEBUG
before including
no code is generated.
assert
Description:
Include:
Prototype:
Argument:
Remarks:
Example:
assert.h
<assert.h>
If the expression is false, an assertion message is printed to stderr and
the program is aborted.
<assert.h>
void assert(int expression);
expression The expression to test.
The expression evaluates to zero or non-zero. If zero, the assertion
fails, and a message is printed to stderr. The message includes the
source file name (__FILE__), the source line number (__LINE__),
the expression being evaluated and the message. The macro then calls
the function abort(). If the macro _VERBOSE_DEBUGGING is defined,
a message will be printed to stderr each time assert() is called.
#include <assert.h> /* for assert */
int main(void)
{
}
Output:
sampassert.c:9 a == 6 -- assertion failed
ABRT
with _VERBOSE_DEBUGGING defined:
sampassert.c:8 a == 4 -- OK
sampassert.c:9 a == 6 -- assertion failed
ABRT
int a;
a = 2 * 2;
assert(a == 4); /* if true-nothing prints */
assert(a == 6); /* if false-print message */
consists of a single macro that is useful for debugging logic
. If the macro
NDEBUG
/* and abort */
is defined,
assert()
DS51456E-page 13
is ignored and
Related parts for SW006014
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: