Discuss Scratch
- Discussion Forums
- » Suggestions
- » New block ideas
- -SkysBane-
-
Scratcher
48 posts
New block ideas
I think you should add a switch statement block that would be something like this (except it would be one big block, not broken up like this. There would be a way to add and remove cases):
And I think you should add a “break” block that would break out of while loops, forever loops, and the switch statement
It would essentially keep the script running, but stop the while loop. Because at the moment, if you put a “stop this script” inside of a while loop, it stops the whole script. Then you have to create a custom block and a bunch of other things just to have the while loop stop in the middle under specific conditions. For example, if you want to stop a calculation when you reach a specific point and you don't want the rest of the code that is in the loop to run, then you could just use the break block. It is also necessary for switch statements since switch statements are fallthrough by default (which would be handy)
The break and switch block run hand in hand, so I think it would be fine to put them both in the same topic. You can't have a switch statement block without also introducing the break block.
switch ()
case: ()
case: ()
case: ()
And I think you should add a “break” block that would break out of while loops, forever loops, and the switch statement
It would essentially keep the script running, but stop the while loop. Because at the moment, if you put a “stop this script” inside of a while loop, it stops the whole script. Then you have to create a custom block and a bunch of other things just to have the while loop stop in the middle under specific conditions. For example, if you want to stop a calculation when you reach a specific point and you don't want the rest of the code that is in the loop to run, then you could just use the break block. It is also necessary for switch statements since switch statements are fallthrough by default (which would be handy)
stop [break v]
The break and switch block run hand in hand, so I think it would be fine to put them both in the same topic. You can't have a switch statement block without also introducing the break block.
Last edited by -SkysBane- (March 6, 2023 14:20:50)
- The_Blue_J
-
Scratcher
1000+ posts
New block ideas
-snip-Basically pause scripts? Could you please elaborate what the block does?
Pls don't make a list of unrelated suggestions, make a separate topic for each suggestion so that each suggestion could get the attention it needs.create List (join [list for level ] (new level number))
insert [thing] at (1) of (join [list for level ] (new level number))
Edit, Ninja'd for the first time in forum history, by 3 scratchers

Last edited by The_Blue_J (March 6, 2023 14:06:01)
- medians
-
Scratcher
1000+ posts
New block ideas
Make separate topics for suggestions because otherwise they’re considered lists of unrelated suggestions.
Also, before making the new topics, check for duplicates (the stickies (basically pinned topics) have info on how to find duplicates and there is also a stickied directory with a lot of suggestions) and check if they are rejected (another sticky).
Also, before making the new topics, check for duplicates (the stickies (basically pinned topics) have info on how to find duplicates and there is also a stickied directory with a lot of suggestions) and check if they are rejected (another sticky).
- -SkysBane-
-
Scratcher
48 posts
New block ideas
-snip-Basically pause scripts? Could you please elaborate what the block does?Pls don't make a list of unrelated suggestions, make a separate topic for each suggestion so that each suggestion could get the attention it needs.create List (join [list for level ] (new level number))
insert [thing] at (1) of (join [list for level ] (new level number))
Edit, Ninja'd for the first time in forum history, by 3 scratchers
Fixed
- -SkysBane-
-
Scratcher
48 posts
New block ideas
Duplicate? https://scratch.mit.edu/discuss/topic/20351/?page=1#post-185612We have the same idea, except they didn't think of the fallthrough that switch statements in java have and the break block. They work together and it would be a new functionality that you can't really get in scratch so far in the same tick.
I am new to forums, so I don't understand a lot of the rules. If we have the same idea, do I have to remove mine or are they different enough that it's okay to have both?
Last edited by -SkysBane- (March 6, 2023 14:17:30)
- The_Blue_J
-
Scratcher
1000+ posts
New block ideas
I think this might be the definition of a duplicateDuplicate? https://scratch.mit.edu/discuss/topic/20351/?page=1#post-185612We have the same idea, except they didn't think of the fallthrough that switch statements in java have and the break block. They work together and it would be a new functionality that you can't really get in scratch so far in the same tick.
Pls continue the discussion here so that the discussion stays in one place.
Last edited by The_Blue_J (March 6, 2023 14:20:09)
- Discussion Forums
- » Suggestions
-
» New block ideas