1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>ASSERTMSG</title>
10</head>
11
12<body>
13
14<h1>ASSERTMSG</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/os.h&gt;</code></pre>
21  </dd>
22<dd><pre><code>void ASSERTMSG(int expression, char* message, ...);</code></pre>
23  </dd>
24</dl>
25
26<h2>Arguments</h2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <tr>
29<TD width="120" bgcolor="#ffffe8"><code><strong><em><STRONG><EM><CODE>expression</CODE></EM></STRONG></em></strong></code></TD>
30<TD width="520">Conditional expression used for checking if the <CODE>_DEBUG</CODE> macro is defined. </TD>
31    </tr>
32  <tr>
33<TD width="120" bgcolor="#ffffe8"><code><strong><em><STRONG><EM><CODE>message</CODE></EM></STRONG></em></strong></code></TD>
34<TD width="520">Pointer to a null-terminated character string to display if <STRONG><EM><CODE>expression</CODE></EM></STRONG> is <CODE>FALSE</CODE>. </TD>
35    </tr>
36  <tr>
37      <TD width="120" bgcolor="#ffffe8"><code><strong><em>...</em></strong></code></TD>
38<TD width="520">Optional argument.</TD>
39    </tr>
40</TABLE>
41<h2>Return Values</h2>
42
43<p>None.</p>
44<H2>Description</H2>
45<P>When the <code>_DEBUG</code> macro is defined and if <code><strong><em>expression</em></strong></code> is <CODE>FALSE</CODE>, <code>ASSERTMSG</code> displays a failure <CODE><STRONG><EM>message</EM></STRONG></CODE>.&nbsp;<STRONG><EM><CODE>message</CODE></EM></STRONG> displays in the debug log window, and the console is halted.</P>
46<P>If the <code>_DEBUG</code> macro is undefined, <code>ASSERTMSG</code> does nothing.</P>
47
48<h2>See Also</h2>
49
50<p><a href="../list.html#Error" target="contents">Error Functions</a>, <code><a href="ASSERT.html">ASSERT</a></code>, <a href="OSHalt.html"><code>OSHalt</code></a>,<code><a href="OSReport.html">OSReport</a></code></p>
51<H2>Revision History</H2>
52<P>03/01/2006 Initial version.</p>
53</body>
54</html>