Computer Dictionary Online

Medical Dictionary   Law Dictionary   Legal Dictionary   Website Design

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 


gotcha

<jargon, programming> A misfeature of a system, especially a programming language or environment, that tends to breed bugs or mistakes because it both enticingly easy to invoke and completely unexpected and/or unreasonable in its outcome.

For example, a classic gotcha in C is the fact that

		if (a=b) {code;}


is syntactically valid and sometimes even correct. It puts the value of "b" into "a" and then executes "code" if "a" is non-zero. What the programmer probably meant was

		if (a==b) {code;}


which executes "code" if "a" and "b" are equal.

[Jargon File]

(1995-04-17)


Contact the Computer Dictionary Online  ::  Link to the Computer Dictionary Online  ::  Disclaimer for Computer Dictionary Online

Computer Dictionary Online
Copyright © 2017