Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Switch statements are the best.

Name: Anonymous 2011-09-06 17:40

Every language should have these.

Name: Anonymous 2011-09-06 18:16


switch([spoiler]/prog/[/spoiler]):
    case [spoiler]shit[/spoiler]:
       sage();
       break;
    case [spoiler]not_shit[/spoiler]:
       /* This code should never execute */
       bump(); [spoiler]bumpy_bumpy_fist_pump();[/spoiler]
       break;
    default:
       meh();

Name: Anonymous 2011-09-06 19:11

>>2
Y helo tharBBCODE MASTER[/code]!!![/code]

Name: Anonymous 2011-09-06 21:05


    switch(/prog/):
        case shit:
           sage();
           break;
        case not_shit:
           /* This code should never execute */
           bump(); bumpy_bumpy_fist_pump();
           break;
        default:
           meh();

Name: Anonymous 2011-09-06 22:08

and they should be implemented using jump tables

Name: Anonymous 2011-09-07 0:32

switches < custom pointer arrays and clever bithacks.

Name: Anonymous 2011-09-07 3:26

>>4

You should assert(0) for code that never executes.

Name: Assert(0) 2011-09-07 4:19

>>7
you shouldn't sages

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List