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

📄 assert.h

📁 This package consists of the executable (UCW), a default script file, this file, and the library fi
💻 H
字号:
// assert.h
// UnderC Development Project, Steve Donovan, 2001
#ifndef __ASSERT_H
#define __ASSERT_H
// 1.2.7 Now uses <stdio.h>, __LINE__, and respects NDEBUG
#include <stdio.h>

#define AS_STR(s) #s

#ifndef NDEBUG
  #define assert(expr)  if (!(expr)) \
           __assert(#expr,__FILE__ ,__LINE__)
#else
 #define assert(expr)
#endif

inline void __assert(char *expr, char* file, int line)
{
   fprintf(stderr,"assertion failed %s %d %s\n",file,line,expr);   
   //exit(-1);
}

#endif

⌨️ 快捷键说明

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