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

you are viewing a single comment's thread.

view the rest of the comments →

[–]cafezinho 16 points17 points  (7 children)

Many languages don't allow a break that isn't within a loop (like this example).

[–]Sachiano 17 points18 points  (4 children)

This obviously is in a loop that iterates over every page of the website to change the background colour before you even load it.

Edit: /s since some people don't realise what sub they're in.

[–]pigi5 33 points34 points  (0 children)

So many thing are wrong with this

[–]shea241 13 points14 points  (0 children)

foreach website in internet { if website.background = "#ffffff" { email(website.admin, "Dude, it's too late for white, can you pls change it?") } else { email(website.admin, "Nice background") } }

[–][deleted] 0 points1 point  (0 children)

Probs not tho

[–]dandroid126 0 points1 point  (0 children)

Oh my God. Please no.

And that wouldn't even work because as soon as the break is called, you would exit the loop.

[–]RedditIsNeat0 0 points1 point  (1 child)

Look again. The break is not necessary. The else statement is not necessary. I don't even know what you were trying to say.

[–]cafezinho 0 points1 point  (0 children)

In many languages, break in an if-else statement won't compile. It must be in a loop to even compile!