1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>SDK_*ASSERT*</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">SDK_*ASSERT* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14<DD><CODE>#include &lt;nitro/misc.h&gt;</CODE><BR> <BR> <CODE>SDK_ASSERT(exp);</CODE>
15<DD><CODE>SDK_ASSERTMSG(exp, fmt, ...);</CODE>
16<DD><CODE>SDK_NULL_ASSERT(exp);</CODE>
17<DD><CODE>SDK_MINMAX_ASSERT(exp, min, max);</CODE>
18<DD><CODE>SDK_MIN_ASSERT(exp, min);</CODE>
19<DD><CODE>SDK_MAX_ASSERT(exp, max);</CODE>
20<DD><CODE>SDK_ALIGN4_ASSERT(exp);</CODE>
21<DD><CODE>SDK_ALIGN2_ASSERT(exp);</CODE>
22</DL>
23<H2>Arguments</H2>
24<TABLE border="1">
25  <TBODY>
26    <TR>
27<TD width="166"><B><I>exp</I></B></TD>
28<TD width="481">The condition parameter.</TD>
29    </TR>
30    <TR>
31<TD width="166"><B><I>fmt</I></B></TD>
32<TD width="481">The display string (format string).</TD>
33    </TR>
34    <TR>
35<TD width="166"><B><I>min</I></B></TD>
36<TD width="481">The minimum value when judging a condition by the range.</TD>
37    </TR>
38    <TR>
39<TD width="166"><B><I>max</I></B></TD>
40<TD width="481">The maximum value when judging a condition by the range.</TD>
41    </TR>
42  </TBODY>
43</TABLE>
44<H2>Return Values</H2>
45<P>None.</P>
46<H2>Description</H2>
47<P>This macro examines a condition, and outputs a string if the condition is not fulfilled. After that, it forces the application to terminate. The <code>SDK_ASSERTMSG</code> macro allows a variable number of arguments according to the format string <code><strong><em>fmt</em></strong></code>.</P>
48<P>Each macro function displays an assert message in the following cases: <code>SDK_ASSERT( exp )</code> is displayed when the value of evaluation expression exp is false (when <code>exp</code> is not formed). <code>SDK_ASSERTMSG( exp, fmt, ... </code> is displayed when the value of evaluation expression <code>exp</code> is false (when <code>exp</code> is not formed). <code>SDK_NULL_ASSERT( exp )</code> is displayed when the value of evaluation expression <code>exp</code> is not equal to NULL. <code>SDK_MINMAX_ASSERT( exp, min, max )</code> is displayed when the value of evaluation expression <code>exp</code> is less than <code>min</code> or greater than <code>max</code>. <code>SDK_MIN_ASSERT( exp, min )</code> is displayed when the value of evaluation expression <code>exp</code> is less than <code>min</code>. <code>SDK_MAX_ASSERT( exp, max )</code> is displayed when the value of evaluation expression <code>exp</code> is greater than <code>max</code>. <code>SDK_ALIGN4_ASSERT( exp )</code> is displayed when the value of evaluation expression <code>exp</code> is not a multiple of 4. <code>SDK_ALIGN2_ASSERT( exp )</code> is displayed when the value of evaluation expression <code>exp</code> is not a multiple of 2.</P>
49<P>
50These macro functions are for debug purposes and the RELEASE build and FINALROM build do not perform the output operation.</P>
51<H2>See Also</H2>
52<P>SDK_WARNING</P>
53<H2>Revision History</H2>
54<P>2004/01/09 Added the description that the RELEASE and ROM builds do not output. <BR>2004/03/12 Added SDK_ALIGN4_ASSERT, SDK_ALIGN2_ASSERT. <BR>2004/02/27 Initial version.</P>
55<hr><p>CONFIDENTIAL</p></body>
56</HTML>