precedence lossage

Computing Dictionary

precedence lossage definition


/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 "&", "|", "^", ">". 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]
(1994-12-16)
The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: precedence
Next Definition: precedency
Words Near: precedence lossage
More from Thesaurus.com
Synonyms and Antonyms for precedence lossage
More from Reference.com
Search for articles containing precedence lossage
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature