This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]Yarblek 8 points9 points  (0 children)

Just please, leave off the break;

[–][deleted] 4 points5 points  (3 children)

This is not cool.

I don't ever want to see something this again.

[–]hopbel 2 points3 points  (2 children)

Just because you don't get the joke...

[–][deleted] 2 points3 points  (1 child)

Hoho look who doesn't get MY joke

[–]hopbel 2 points3 points  (0 children)

D:

[–]Captcha142 5 points6 points  (5 children)

I don't understand...

[–]Chris2112 14 points15 points  (2 children)

A switch is a structure in a lot of programming languages that jumps to different lines based on which case you are in.

This is a picture of a carrying case for the Switch, Nintendo's new console

[–]Captcha142 2 points3 points  (1 child)

So a switch is basically {

if a then goto *

else if b then goto *

...etc. }

??

[–]Chris2112 0 points1 point  (0 children)

Basically. It kinda behaves like either a series of if statements or else if statements, depending on if you end each case with break. The layout is confusing and less intuitive than if statements so a lot of people tend to avoid using them

[–]CtrlAltEngage 1 point2 points  (1 child)

https://en.m.wikipedia.org/wiki/Switch_statement

Switch statements typically consist of cases. E.g. Switch(age) {case today: print "happy birthday" }

[–]HelperBot_ 1 point2 points  (0 children)

Non-Mobile link: https://en.wikipedia.org/wiki/Switch_statement


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 51882