⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 assert.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
字号:
<HTML><HEAD><TITLE>&lt;assert.h&gt;</TITLE></HEAD><BODY><H1><A NAME="&lt;assert.h&gt;"><CODE>&lt;assert.h&gt;</CODE></A></H1><HR><P>Include the standard header <B><CODE>&lt;assert.h&gt;</CODE></B>to define the macro<A HREF="#assert"><CODE>assert</CODE></A>,which is useful for diagnosing logic errors inthe program. You can eliminate the testing code produced by the macro<CODE>assert</CODE> without removing the macro references from the programby defining the macro<B><A NAME="NDEBUG"><CODE>NDEBUG</CODE></A></B>in the program before you include<CODE>&lt;assert.h&gt;</CODE>. Each time the program includes this header,it redetermines the definition of the macro <CODE>assert</CODE>.</P><PRE>#undef assert#if defined NDEBUG#define <B><A HREF="#assert">assert</A></B>(test) (void)0#else#define <B><A HREF="#assert">assert</A></B>(test) <I>&lt;void expression&gt;</I>#endif</PRE><H2><A NAME="assert"><CODE>assert</CODE></A></H2><PRE>#undef assert#if defined NDEBUG#define <B>assert</B>(test) (void)0#else#define <B>assert</B>(test) <I>&lt;void expression&gt;</I>#endif</PRE><P>If the <I>int</I> expression <CODE>test</CODE> equals zero,the macro writes to<A HREF="stdio.html#stderr"><CODE>stderr</CODE></A>a diagnostic message that includes:</P><UL><LI>the text of <CODE>test</CODE></LI><LI>the source filename (the predefined macro<A HREF="preproc.html#__FILE__"><CODE>__FILE__</CODE></A>)</LI><LI>the source line number (the predefined macro<A HREF="preproc.html#__LINE__"><CODE>__LINE__</CODE></A>)</LI></UL><P>It then calls<A HREF="stdlib.html#abort"><CODE>abort</CODE></A>.</P><P>You can write the macro <CODE>assert</CODE> in the program in any<A HREF="function.html#side-effects context">side-effects context</A>.</P><HR><P>See also the<B><A HREF="index.html#Table of Contents">Table of Contents</A></B> and the<B><A HREF="_index.html">Index</A></B>.</P><P><I><A HREF="crit_pb.html">Copyright</A> &#169; 1989-2002by P.J. Plauger and Jim Brodie. All rights reserved.</I></P><!--V4.01:1125--></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -