Share on Facebook Share on Twitter Email
Answers.com

fall through

 
Idioms: fall through

Fail, miscarry, as in The proposed amendment fell through, or I hope our plans won't fall through. [Late 1700s]


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Hacker Slang: fall through
Top

(n. fallthrough, var.: fall-through)

1. To exit a loop by exhaustion, i.e., by having fulfilled its exit condition rather than via a break or exception condition that exits from the middle of it. This usage appears to be really old, dating from the 1940s and 1950s.

2. To fail a test that would have passed control to a subroutine or some other distant portion of code.

3. In C, ‘fall-through’ occurs when the flow of execution in a switch statement reaches a case label other than by jumping there from the switch header, passing a point where one would normally expect to find a break. A trivial example:


switch (color)
{
case GREEN:
   do_green();
   break;
case PINK:
   do_pink();
   /* FALL THROUGH */
case RED:
   do_red();
   break;
default:
   do_blue();
   break;
}

The variant spelling /* FALL THRU */ is also common.

The effect of the above code is to do_green() when color is GREEN, do_red() when color is RED, do_blue() on any other color other than PINK, and (and this is the important part) do_pink() and then do_red() when color is PINK. Fall-through is considered harmful by some, though there are contexts (such as the coding of state machines) in which it is natural; it is generally considered good practice to include a comment highlighting the fall-through where one would normally expect a break. See also Duff's device.


WordNet: fall through
Top
Note: click on a word meaning below to see its connections and related words.

The verb has one meaning:

Meaning #1: fail utterly; collapse
  Synonyms: fall flat, founder, flop


 
 

 

Copyrights:

Idioms. The American Heritage® Dictionary of Idioms by Christine Ammer. Copyright © 1997 by The Christine Ammer 1992 Trust. Published by Houghton Mifflin Company. All rights reserved.  Read more
Hacker Slang. The Jargon File. Copyright © 2007.  Read more
WordNet. WordNet 1.7.1 Copyright © 2001 by Princeton University. All rights reserved.  Read more