LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Label Loops

Root / Submissions / [.]

chickenCreated:

NEVER USE THESE.

@LOOP
 'CODE
GOTO @LOOP
@LOOP
 GCLS
 GOSUB @GAME
 GOSUB @RENDER
 WAIT 1
GOTO @LOOP

@GAME
 'CODE
RETURN

@RENDER
 'CODE
RETURN

Too bad, label loops are the only loops I feel like learning, plus it would take me too long to change my games code to use WHILE loops.

Replying to:Arkzen
Too bad, label loops are the only loops I feel like learning, plus it would take me too long to change my games code to use WHILE loops.
Your code would benefit. I learned how to use WHILE in a few minutes after people were saying not to use them.

There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so

Replying to:MasterR3C0RD
There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so
It is more readable to use other types of loops, and eliminates any possibility of you mixing up your loop labels with your data labels. EDIT: Other loops work with auto-indenters, while label loops are left in the dust.

THIS RESOURCE IS MORE WRONG THAN SOMEONE SAYING SONIC 06 IS THE BEST SONIC GAME EVEN BOB THE BUILDER CAN'T FIX THIS #roast

Replying to:Arkzen
Too bad, label loops are the only loops I feel like learning, plus it would take me too long to change my games code to use WHILE loops.
it would NOT benefit. GOTO loops are better than regular loops because they are faster!

Replying to:MasterR3C0RD
There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so
no, it's more readable to use GOTO loops instead of FOR loops

Replying to:IAmRalsei
THIS RESOURCE IS MORE WRONG THAN SOMEONE SAYING SONIC 06 IS THE BEST SONIC GAME EVEN BOB THE BUILDER CAN'T FIX THIS #roast
Did you just delete your comment to get rid of my reply?

Replying to:MasterR3C0RD
There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so
You're spewing crap now. Why would you ever use a GOTO loop in place of a FOR loop situation?

Replying to:MasterR3C0RD
There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so
GOTO loops are more readable than FOR loops

Replying to:IAmRalsei
THIS RESOURCE IS MORE WRONG THAN SOMEONE SAYING SONIC 06 IS THE BEST SONIC GAME EVEN BOB THE BUILDER CAN'T FIX THIS #roast
i didn't see your reply. i just moved the main point of it to a reply on another comment.

ported from my resource Title:GOTO Loops (chicken rebuttal) description: GOTO loops are better than FOR loops for these reasons: 1. Faster 2. Clearer 3. they both do the same thing (i think) 4. GOTO loops easier to read for people who aren't good at programming and GOTO loops are also faster than every other loop, but that's the only pro over using GOTO over REPEAT UNTIL or WHILE 1 WEND loops. those loops are better at doing specific things. But...that's about it. i've said all i can say about GOTO loops.
Bad Joke About Bob The Builderchicken's resource is so broken bob the builder can't fix it
so what do you think? are GOTO loops or FOR loops better? [poll=p271][/poll] vote on that poll! tags:chicken rebuttal bad jokes roasts GOTO loops FOR LOOPS ARE BAD! tagline:DaSonicMario VS chicken GOTO loops vs every other kind of loop WHICH SIDE ARE YOU ON? images: IMAGE 1: IMAGE 2: IMAGE 3:

Replying to:IAmRalsei
ported from my resource Title:GOTO Loops (chicken rebuttal) description: GOTO loops are better than FOR loops for these reasons: 1. Faster 2. Clearer 3. they both do the same thing (i think) 4. GOTO loops easier to read for people who aren't good at programming and GOTO loops are also faster than every other loop, but that's the only pro over using GOTO over REPEAT UNTIL or WHILE 1 WEND loops. those loops are better at doing specific things. But...that's about it. i've said all i can say about GOTO loops.
Bad Joke About Bob The Builderchicken's resource is so broken bob the builder can't fix it
so what do you think? are GOTO loops or FOR loops better? [poll=p271][/poll] vote on that poll! tags:chicken rebuttal bad jokes roasts GOTO loops FOR LOOPS ARE BAD! tagline:DaSonicMario VS chicken GOTO loops vs every other kind of loop WHICH SIDE ARE YOU ON? images: IMAGE 1: IMAGE 2: IMAGE 3:
Dude, this isn't a competition to see who's opinion is better, it is just a resource suggesting something you shouldn't use. To me it seems like you are spewing out crap just to be "right". Also, how do you know that GOTO loops are faster? Chicken may be right and FOR loops may be better. It also seems like the only reason you like GOTO loops is because you don't feel like learning WHILE, FOR, and WEND to make FOR loops. I may be wrong about all of this, but I suggest you be quiet and stray away from this resource.
SpoilerI swear if this reply gets deleted because I said for you to be quiet I will chuck a pineapple at someone.
Not trying to start a fight, but still, you should probably delete this comment, better yet have an admin delete it. EDIT: Ok, so throw all the stuff I said about speed in the trash can because I just noticed MBR's comment. Sorry about that.

thanks chicken, for showing not to use worse loops. i already knew, but this can help others.

Replying to:Arkzen
Too bad, label loops are the only loops I feel like learning, plus it would take me too long to change my games code to use WHILE loops.
How do you know this DSM? EDIT: I now see MBR’s comment

Replying to:IAmRalsei
ported from my resource Title:GOTO Loops (chicken rebuttal) description: GOTO loops are better than FOR loops for these reasons: 1. Faster 2. Clearer 3. they both do the same thing (i think) 4. GOTO loops easier to read for people who aren't good at programming and GOTO loops are also faster than every other loop, but that's the only pro over using GOTO over REPEAT UNTIL or WHILE 1 WEND loops. those loops are better at doing specific things. But...that's about it. i've said all i can say about GOTO loops.
Bad Joke About Bob The Builderchicken's resource is so broken bob the builder can't fix it
so what do you think? are GOTO loops or FOR loops better? [poll=p271][/poll] vote on that poll! tags:chicken rebuttal bad jokes roasts GOTO loops FOR LOOPS ARE BAD! tagline:DaSonicMario VS chicken GOTO loops vs every other kind of loop WHICH SIDE ARE YOU ON? images: IMAGE 1: IMAGE 2: IMAGE 3:
Let’s get a more reasonable poll in here and let EVERYONE see the results this time.[poll=p272][/poll]

Replying to:IAmRalsei
ported from my resource Title:GOTO Loops (chicken rebuttal) description: GOTO loops are better than FOR loops for these reasons: 1. Faster 2. Clearer 3. they both do the same thing (i think) 4. GOTO loops easier to read for people who aren't good at programming and GOTO loops are also faster than every other loop, but that's the only pro over using GOTO over REPEAT UNTIL or WHILE 1 WEND loops. those loops are better at doing specific things. But...that's about it. i've said all i can say about GOTO loops.
Bad Joke About Bob The Builderchicken's resource is so broken bob the builder can't fix it
so what do you think? are GOTO loops or FOR loops better? [poll=p271][/poll] vote on that poll! tags:chicken rebuttal bad jokes roasts GOTO loops FOR LOOPS ARE BAD! tagline:DaSonicMario VS chicken GOTO loops vs every other kind of loop WHICH SIDE ARE YOU ON? images: IMAGE 1: IMAGE 2: IMAGE 3:
GOTO loops aren't that much more faster. We're talking milliseconds here, which doesn't matter unless you're making a very very advanced game where those milliseconds are the difference between staying above 30FPS or dropping frames like it's hot. So stop being an annoying pest and shut up about things you know nothing about.

Replying to:IAmRalsei
ported from my resource Title:GOTO Loops (chicken rebuttal) description: GOTO loops are better than FOR loops for these reasons: 1. Faster 2. Clearer 3. they both do the same thing (i think) 4. GOTO loops easier to read for people who aren't good at programming and GOTO loops are also faster than every other loop, but that's the only pro over using GOTO over REPEAT UNTIL or WHILE 1 WEND loops. those loops are better at doing specific things. But...that's about it. i've said all i can say about GOTO loops.
Bad Joke About Bob The Builderchicken's resource is so broken bob the builder can't fix it
so what do you think? are GOTO loops or FOR loops better? [poll=p271][/poll] vote on that poll! tags:chicken rebuttal bad jokes roasts GOTO loops FOR LOOPS ARE BAD! tagline:DaSonicMario VS chicken GOTO loops vs every other kind of loop WHICH SIDE ARE YOU ON? images: IMAGE 1: IMAGE 2: IMAGE 3:
GOTO loops may make sense, but WHILE and REPEAT loops are so much better. I don't know what you're talking about with "easier for beginners," WHILE and REPEAT make so much more sense. With GOTO loops, the only hint of what it's doing is in a random IF statement. With WHILE and REPEAT loops, that IF statement is built directly into the command itself. Also, why are you not using FOR loops?! They're so simple! They just take go from one number to another number using the variable you provided. Trying to make a GOTO Seriously, give a reason that GOTO is better than WHILE, FOR, and REPEAT without saying "its faster" or "its easyer for beginners." These commands don't exist to be more complex and for advanced users, they exist to make your code look great and make it more readable. Also, in modern languages, GOTO isn't even a command. There's only WHILE, FOR, and REPEAT. Also maybe CASE. Anyway, if you need code examples for the new commands, just ask someone. Finally, there's a manual built into the editor! Use it. </angryParagraphs>

Replying to:MasterR3C0RD
There's nothing inherently wrong with using label loops, but it's better to use WHILE, FOR, REPEAT, etc unless you need to make sure your program runs as fast as possible, since label loops don't prepare you for other programming languages in the future, and usually you don't need to squeeze every bit of speed out of your code in SB so
Wait, you're saying this...
I=0
@LOOP
PRINT "HI! ";I
I=I+1
IF I<=9 THEN:GOTO @LOOP
...is more readable than this?!:
FOR I=0 TO 9
 PRINT "HI! ";I
NEXT
don't forget to also indent your code

I agree and disagree. I think GOTO loops are nice for beginners to understand how loops work (especially if they have no programming experience). With that being said, once you have the basics down it is time to abandon label loops, otherwise you will not grow as a programmer beyond the "beginner" levels.