TERMIUM Plus®

The Government of Canada’s terminology and linguistic data bank.

ERREUR TYPE FENCEPOST [1 record]

Record 1 1998-06-03

English

Subject field(s)
  • Informatics
DEF

A problem with the discrete equivalent of a boundary condition, often exhibited in programs containing iterative loop. [The term comes from] the following problem: "If you build a fence 100 feet long with posts 10 feet apart, how many posts do you need?" (either 9 or 11 is a better answer than the obvious 10.)

OBS

Fencepost errors come from counting things rather than counting the spaces between them, or vice versa, or by neglecting to consider whether one should count one or both of the ends of a row.

French

Domaine(s)
  • Informatique
DEF

Problème que l'on retrouve souvent dans les programmes intégrant des boucles itératives. Vient du problème suivant : «Si vous construisez une palissade de 100 mètres de long avec des poteaux séparés de 10 mètres, de combien de poteaux avez-vous besoin?». Il vaut mieux répondre neuf ou onze que 10, pourtant plus évident a priori.

CONT

Un programme qui utilisera la formule «évidente» contiendra une erreur de type fencepost.

OBS

Ici, c'est le décompte des éléments qui emporte et non les intervalles qui existent entre eux. Dit autrement, ce genre d'erreur survient lorsque l'on ne sait pas si l'on doit compter une seule ou les deux extrémités d'une rangée.

Spanish

Save record 1

Copyright notice for the TERMIUM Plus® data bank

© Public Services and Procurement Canada, 2024
TERMIUM Plus®, the Government of Canada's terminology and linguistic data bank
A product of the Translation Bureau

Features

Language Portal of Canada

Access a collection of Canadian resources on all aspects of English and French, including quizzes.

Writing tools

The Language Portal’s writing tools have a new look! Easy to consult, they give you access to a wealth of information that will help you write better in English and French.

Glossaries and vocabularies

Access Translation Bureau glossaries and vocabularies.

Date Modified: