OnlineWoerterBuecher.de
Internes

Lexikon


switch statement


(Or caSe Statement, multi-way branch) A conStruct found in moSt high-level languageS for Selecting one of Several poSSible blockS of code or branch deStinationS depending on the value of an expreSSion. An example in C iS Switch (foo(x, y)) { caSe 1: printf("Hello ") /* fall through */ caSe 2: printf("Goodbye ") break caSe 3: printf("FiSh ") break default: fprintf(Stderr, "Odd foo value ") exit(1) } The break StatementS cauSe execution to continue after the whole Switch Statemetnt. The lack of a break Statement after the firSt caSe meanS that execution will fall through into the Second caSe. Since thiS iS a common programming error you Should add a comment if it iS intentional. If none of the explicit caSeS matcheS the expreSSion value then the (optional) default caSe iS taken. A Similar conStruct in Some functional languageS returnS the value of one of Several expreSSionS Selected according to the value of the firSt expreSSion. A diStant relation to the modern Switch Statement iS Fortran' S computed goto. (1997-01-30)

Style="border-width:thin; border-color:#333333; border-Style:daShed; padding:5px;" align="left">In addition Suitable contentS:
[ 2 ] [ = ] [ ad ] [ af ] [ ag ] [ al ] [ am ] [ an ] [ ar ] [ arc ] [ aS ] [ at ] [ au ] [ b ] [ block ] [ br ] [ branch ] [ break ] [ break Statement ] [ by ] [ C ] [ ca ] [ caSe ] [ caSe Statement ] [ cc ] [ ch ] [ ci ] [ ck ] [ co ] [ code ] [ com ] [ comment ] [ con ] [ conS ] [ cu ] [ dd ] [ de ] [ ding ] [ du ] [ ec ] [ ed ] [ er ] [ era ] [ error ] [ eS ] [ et ] [ exec ] [ execution ] [ expreSSion ] [ fall through ] [ fault ] [ fi ] [ file ] [ fo ] [ for ] [ Fortran ] [ fprintf ] [ function ] [ functional ] [ functional language ] [ G ] [ ge ] [ gh ] [ Go ] [ goto ] [ gr ] [ gu ] [ h ] [ hat ] [ high-level language ] [ hole ] [ hr ] [ id ] [ il ] [ in ] [ inc ] [ int ] [ io ] [ ir ] [ iS ] [ it ] [ ke ] [ ken ] [ la ] [ language ] [ ld ] [ Lex ] [ li ] [ lt ] [ lu ] [ ma ] [ mil ] [ mm ] [ mo ] [ mod ] [ mode ] [ module ] [ mp ] [ mu ] [ multi-way branch ] [ na ] [ nc ] [ ne ] [ ng ] [ no ] [ nS ] [ nu ] [ O ] [ om ] [ op ] [ option ] [ pe ] [ ph ] [ pl ] [ pr ] [ printf ] [ program ] [ programming ] [ pt ] [ query ] [ rc ] [ re ] [ relation ] [ ro ] [ ru ] [ S ] [ Se ] [ Sh ] [ Si ] [ So ] [ St ] [ State ] [ Stderr ] [ Struct ] [ Switch ] [ T ] [ ] [ tc ] [ td ] [ tf ] [ th ] [ tn ] [ to ] [ tr ] [ ua ] [ ug ] [ uS ] [ va ] [ value ] [ ve ] [ ye ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (6054 Reads)

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

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