assertion statement 中文意思是什麼

assertion statement 解釋
斷言語句
  • assertion : n. 1. 主張,斷言,確言。2. 維護,堅持。
  • statement : n. 1. 陳述,聲明,聲明書。2. 【法律】供述;交待。3. 【商業】貸借對照表;(財務)報告書。
  1. An assertion statement specifies a condition that you expect to hold true at some particular point in your program

    斷言語句指定在程序的某些特定點應為真的條件。
  2. If you assume that an argument is not null, for example, use an assertion statement to check for that assumption

    例如,如果假定某個參數不為null ,請使用一條斷言語句檢查該假定。
  3. 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

    當在調試器下運行該代碼時,將計算斷言語句,但是在發布版本中,將不進行該比較,因此沒有額外的系統開銷。
分享友人