Chuyển bộ gõ


Từ điển Máy Tính - Foldoc Dictionary
precedence lossage



precedence lossage

/pre's*-dens los'*j/ A misunderstanding of operator precedence resulting in unintended grouping of arithmetic or logical operators when coding an expression. Used especially of mistakes in C code due to the nonintuitively low precedence of "&", "|", "^", "<<" and ">>". For example, the following C expression, intended to test the least significant bit of x,

 x & 1 == 0 
is parsed as

 x & (1 == 0) 
which is always zero (false).

Some lazy programmers ignore precedence and parenthesise everything. Lisp fans enjoy pointing out that this can't happen in *their* favourite language, which eschews precedence entirely, requiring one to use explicit parentheses everywhere.

[Jargon File]

Last updated: 1994-12-16




Giới thiệu VNDIC.net | Plugin từ diển cho Firefox | Từ điển cho Toolbar IE | Tra cứu nhanh cho IE | Vndic bookmarklet | Học từ vựng | Vndic trên web của bạn

© Copyright 2006-2024 VNDIC.NET & VDICT.CO all rights reserved.