SW006013 Microchip Technology, SW006013 Datasheet - Page 17

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
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 SW006013