断言 say with certainty; assert categorically; affirm; declare; state with certainty; affirmance; assertion; asseveration 大胆断言 boldly assert; 无根据地断言 groundlessly assert; 断言集论 predicative set theory; 断言数据库 assertion data base; 断言语句 assertion statement
言语 言语spoken language; speech; verbal; lalia 言语和文字 spoken and written language; 言语唐突 brusque in speech; snippy; 言语粗俗 be coarse and vulgar in speech; use coarse language; 言语尖利 bitterness of speech; 言语之争 a verbal warfare; 言语支吾 prevaricated in speech
You can add assertion statements as the pre - or post - conditions of a method 可以将断言语句作为方法的前置条件或后置条件来添加。
An assertion statement specifies a condition that you expect to hold true at some particular point in your program 断言语句指定在程序的某些特定点应为真的条件。
If you assume that an argument is not null , for example , use an assertion statement to check for that assumption 例如,如果假定某个参数不为null ,请使用一条断言语句检查该假定。
Be especially careful about using function calls in assertion statements , because evaluating a function can have unexpected side effects 在断言语句中使用函数调用时应特别小心,因为计算函数可能会有意外的副作用。
When you run this code under the debugger , the assertion statement is evaluated , but in the release version , the comparison is not made , so there is no additional overhead 当在调试器下运行该代码时,将计算断言语句,但是在发布版本中,将不进行该比较,因此没有额外的系统开销。
Discusses assertion statements , how they work , the benefits of using them catching logic errors , checking results of an operation , and testing error conditions , their interaction with 讨论断言语句,包括它们的工作方式,使用它们的好处(捕捉逻辑错误、检查操作的结果和测试错误情况) ,它们与
Therefore , assertion statements have zero overhead in your final release program ; you can use them liberally in your code without affecting the performance of your release version and without having to use 因此,断言语句在最终发布程序中系统开销为零;可以在代码中大量使用断言语句,而不影响“ release ”版本的性能,并且不必使用