assert.h

来自「msp 的开发实例程序」· C头文件 代码 · 共 36 行

H
36
字号
/*                      - ASSERT.H -

   assert macro facility.

   NOTE: _Assert should report problems to 'stderr' for hosted
   implementations according to ANSI.
   May be implemented if the target supports it.

   $Revision: 38615 $

   Copyright 1986 - 1999 IAR Systems. All rights reserved.
*/

#ifndef _ASSERT_INCLUDED
#define _ASSERT_INCLUDED

#ifndef _SYSTEM_BUILD
  #pragma system_include
#endif

#ifdef NDEBUG

#define assert(ignore)  ( (void) 0)

#else

void _Assert(const char *, const char *, int); /* forward declaration */

#define assert(arg)   ((arg) ? (void)0 : (void) _Assert ( \
                        #arg,__FILE__, __LINE__ ) )

#endif  /* NDEBUG */

#endif  /* _ASSERT_INCLUDED */

⌨️ 快捷键说明

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