OnlineWoerterBuecher.de
Internes

Lexikon


fall through


(The American misspelling "fall thru" is also common) 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 (colour) { case GREEN: do_green() break case PINK: do_pink() /* FALL THROUGH */ case RED: do_red() break default: do_blue() break } The effect of the above code is to "do_green()" when colour is "GREEN", "do_red()" when colour is "RED", "do_blue()" on any other colour other than "PINK", and (and this is the important part) "do_pink()" *and then* "do_red()" when colour 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.

In addition suitable contents:
[ 2 ] [ = ] [ ad ] [ ag ] [ ai ] [ AL ] [ al ] [ am ] [ an ] [ app ] [ ar ] [ arc ] [ as ] [ at ] [ au ] [ av ] [ b ] [ be ] [ bo ] [ br ] [ break ] [ by ] [ C ] [ ca ] [ case ] [ cc ] [ ch ] [ cl ] [ co ] [ code ] [ colour ] [ com ] [ comment ] [ con ] [ cons ] [ considered harmful ] [ context ] [ control ] [ cu ] [ D ] [ dd ] [ de ] [ ding ] [ do ] [ du ] [ E ] [ ec ] [ ed ] [ ee ] [ er ] [ era ] [ es ] [ exception ] [ exec ] [ execution ] [ expect ] [ fall thru ] [ fault ] [ fi ] [ file ] [ fr ] [ G ] [ ge ] [ gen ] [ gh ] [ gr ] [ GRE ] [ h ] [ hat ] [ header ] [ hr ] [ ht ] [ id ] [ il ] [ import ] [ in ] [ inc ] [ include ] [ int ] [ io ] [ is ] [ it ] [ jump ] [ K ] [ la ] [ ld ] [ Lex ] [ li ] [ LL ] [ loop ] [ ls ] [ lt ] [ lu ] [ ly ] [ ma ] [ machine ] [ mall ] [ mm ] [ mo ] [ mod ] [ module ] [ mp ] [ N ] [ na ] [ nc ] [ ne ] [ ng ] [ no ] [ norm ] [ ns ] [ O ] [ om ] [ op ] [ pa ] [ pe ] [ ph ] [ PI ] [ PIN ] [ ping ] [ pl ] [ point ] [ port ] [ pr ] [ program ] [ programming ] [ pt ] [ query ] [ rc ] [ RE ] [ re ] [ real ] [ ro ] [ routine ] [ ru ] [ S ] [ sa ] [ se ] [ si ] [ so ] [ spell ] [ st ] [ state ] [ state machine ] [ su ] [ subroutine ] [ switch ] [ switch statement ] [ T ] [ tc ] [ test ] [ text ] [ th ] [ to ] [ tr ] [ ug ] [ um ] [ us ] [ ve ] [ vi ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (6457 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0948 Seconds, with 17 Database-Queries
Zurück zur Startseite