Discuss Scratch
- Discussion Forums
- » Suggestions
- » Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
- iamunknown2
-
Scratcher
1000+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
Guys, I KNOW it's workaroundable, and it might confuse new scratchers. I get what you are saying about the Help With Scripts forum, and I know it's workaroundable, but it would make scripts look nicer and cleaner.Also, what looks cleaner:
foreveror
do stuff
end
label [test v] :: control?
do stuff
goto [label v] :: control
Plus, if goto blocks were cleaner and more practical, why would they ditch goto blocks all together when they invented C?
As my first scripting language was batch (where I used it to crash my PC with a fork bomb), I KNOW that learning a new type of control blocks can be confusing. However, as control blocks are 1) cleaner, 2) more practical and 3) the de-facto standard, it would be the best to not use goto blocks.
Last edited by iamunknown2 (Sept. 12, 2015 07:21:22)
- iamunknown2
-
Scratcher
1000+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
BUMP?
- sithsiri
-
Scratcher
100+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
These blocks are so useful in JS and batch
Support
Oh. I auto-bumped
Support
Oh. I auto-bumped

Last edited by sithsiri (Sept. 13, 2015 12:20:01)
- Scratcher1002
-
Scratcher
1000+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
They didn't in C++, I didn't do a lot with C so I don't know but in C++ you can do this:Guys, I KNOW it's workaroundable, and it might confuse new scratchers. I get what you are saying about the Help With Scripts forum, and I know it's workaroundable, but it would make scripts look nicer and cleaner.Also, what looks cleaner:foreveror
do stuff
endlabel [test v] :: control?
do stuff
goto [label v] :: control
Plus, if goto blocks were cleaner and more practical, why would they ditch goto blocks all together when they invented C?
As my first scripting language was batch (where I used it to crash my PC with a fork bomb), I KNOW that learning a new type of control blocks can be confusing. However, as control blocks are 1) cleaner, 2) more practical and 3) the de-facto standard, it would be the best to not use goto blocks.
system(“echo Hello World!”);Which makes it function like an echo from Batch script.
Also,
system(“color *insert color thing here*”);I believe goto codes were still there and useable to.
- Scratcher1002
-
Scratcher
1000+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
Scratch blocks are kinda already confusing to new people…Guys, I KNOW it's workaroundable, and it might confuse new scratchers. I get what you are saying about the Help With Scripts forum, and I know it's workaroundable, but it would make scripts look nicer and cleaner.Also, what looks cleaner:foreveror
do stuff
endlabel [test v] :: control?
do stuff
goto [label v] :: control
Plus, if goto blocks were cleaner and more practical, why would they ditch goto blocks all together when they invented C?
As my first scripting language was batch (where I used it to crash my PC with a fork bomb), I KNOW that learning a new type of control blocks can be confusing. However, as control blocks are 1) cleaner, 2) more practical and 3) the de-facto standard, it would be the best to not use goto blocks.
- Scratcher1002
-
Scratcher
1000+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
Question #1: It would stop that script and go to the label, aka skip the 1 second wait.And why is the goto block messy?goto is outdated, and is only used in languages that were made before C was invented.
Goto doesn't work well in object oriented languages. What if I put a label in one script and a “goto” call in another script?when gf clickedWould it stop the broadcast? Would it skip the wait for one second? Would it give up altogether and turn into an infinite improbability drive? It's too ambiguous (similar to why the broadcast boolean is on the list of rejected blocks), so no support.
do stuff
broadcast [something v] and wait
wait (1) secs
label [test v] :: control
say [something]
when I receive [something v]
goto [test v] :: control
If you can answer those questions, I've got another one for you: What if you put the label block in one sprite, and the goto block in another?
I know what the switch block is, but no support, as it's a bit too specific for something like Scratch.
Question #2: I actually think that each sprite would have their own labels to not cause confusion.
Also, Blue Unicorns Use Ponytails.
- Gaza101
-
Scratcher
500+ posts
Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)
Scratch blocks are kinda already confusing to new people…That's not a valid reason to make them more confusing. There's a reason why most languages don't have goto implemented: it makes code messier and is bad practice as a result.
- Discussion Forums
- » Suggestions
-
» Switch and label block (Supporters 2:2:2 for switch 2:1:1 for label)