off-by-one error

原始詞典資料1 筆記錄

這個字我們還沒有寫成教學內容。以下是外部詞典記錄的用法,原文照列,方便你先看懂它的意思。

off-by-one errornoun

  • 1

    computingengineeringmathematicsA logic error where a value, typically the number of iterations of a loop, is specified incorrectly, being either 1 less or 1 more than it should be.

    • Using an incorrect relational operator or an incorrect final value of a loop counter in the loop-continuation condition of a repetition statement causes an off-by-one error.

資料來源:英文維基詞典 English WiktionaryCC BY-SA 4.0)。 原文照列,未經改寫。