ASSERT macro
来源:互联网 发布:网络批发城 编辑:程序博客网 时间:2024/06/15 11:46
翻译
ASSERT 宏
计算传给 ASSERT 宏的表达式,若表达式的计算结果为FALSE,则显示诊断信息。在软件的发行版中,该宏会被忽略。
语法
C++
void ASSERT( BOOL cond);
参数
cond
需要计算的表达式。
返回值
此宏不返回值。
备注
在调试版中,若表达式的值为FALSE,此宏将显示一个消息框,其中包含原表达式自身、源文件的名称、assert所在行的行号。用户不仅可以手动忽略 ASSERT 宏,还可以通过 ASSERT 宏来进入调试器或退出应用程序。
示例
ASSERT(rtStartTime <= rtEndTime);
需求
请参阅
Assert and Breakpoint Macros
原文
ASSERT macro
Evaluates an expression, and displays a diagnostic message if the expression is FALSE. Ignored in retail builds.
Syntax
C++
void ASSERT( BOOL cond);
Parameters
cond
Expression to evaluate.
Return value
This macro does not return a value.
Remarks
In debug builds, if the expression is FALSE, this macro displays a message box with the text of the expression, the name of the source file, and the line number. The user can ignore the assertion, enter the debugger, or quit the application.
Examples
ASSERT(rtStartTime <= rtEndTime);
Requirements
See also
Assert and Breakpoint Macros
0 0
- ASSERT macro
- when to use the macro "assert(expression)"
- macro
- macro
- macro
- The C assert( ) macro (C语言的一种宏应用:断言)
- assert
- assert
- assert
- assert
- ASSERT()
- assert
- assert
- ASSERT
- ASSERT
- assert
- assert
- assert
- ACM常用输入输出方式
- apache所有项目下载地址
- Java创建线程的三种方法比较及用法
- PHP---如何修改域名的指定的根目录
- Hibernate之映射
- ASSERT macro
- AIX自动启动和关闭脚本
- Next Greater Element I
- Jmeter中Sampler响应结果乱码问题解决之道
- 21.Vector ArrayList LinkedList
- phpcmsV9静态页面替换动态步骤
- IDEA 、PyCharm Subscription Validation 2017
- Ajax基础
- 阿里ODPS架构与SQL过程