Discuss Scratch
- Discussion Forums
- » Suggestions
- » Operators Changes
- BoyoolHarita
-
Scratcher
100+ posts
Operators Changes
By adding an extra slot to the existing dropdown operators block and moving addition, multiplication, division and subtraction to it, this would allow Scratchers to more easily fix errors involving using the wrong operation.
For example, let's say you put this…
As for the (round) block, it would allow it to round to the nearest multiple of the first number, (e.g. (5 round 13) would produce 15).
(Yeah I don't know how to properly change the operators' colors
)
For example, let's say you put this…
if <([5] + (my variable)) = (target)> then… but meant for it to be multiplication. As it is, now, you'd have to manually remove the addition, put the multiplication in, and then replace the variables to create this…
. . . ::grey
end
if <([5] * (my variable)) = (target)> thenHowever, with a merged operators block, it would be as simple as clicking a dropdown menu and then clicking the desired operation to fix a problem, which would significantly speed up the bug fixing process, so this…
. . . ::grey
end
if <([5] [+ v] (my variable) ::operators) = (target)> then…can easily turn to this…
. . . ::grey
end
if <([5] [* v] (my variable) ::operators) = (target)> thenMerging the boolean operators could also be helpful along with the addition of >= and <=. This would also compress the Operators list to this (except greener):
. . . ::grey
end
([] [+ v] [] ::operators)(not ) would still be separate due to its nature of only having one side. This would significantly improve bug fixing as issues involving operators would be far easier to fix.
<[] [= v] [] ::operators>
<[] [and v] [] ::operators>
<not []>
As for the (round) block, it would allow it to round to the nearest multiple of the first number, (e.g. (5 round 13) would produce 15).
(Yeah I don't know how to properly change the operators' colors
)Last edited by BoyoolHarita (Oct. 31, 2023 15:06:20)
- Zydrolic
-
Scratcher
1000+ posts
Operators Changes
Pretty sure I've seen a discussion like this but can't find it anymore
eg
:: operators
would color it the same color as an operator, you can also use hex code (note that words of color (eg “blue”) will not color it)
so in your case the blocks would be
EDIT: Forgot to mention, but have this scratch wiki page that gives all the syntaxes
(#1):: (block section)
(Yeah I don't know how to properly change the operators' colors)
eg
:: operators
would color it the same color as an operator, you can also use hex code (note that words of color (eg “blue”) will not color it)
so in your case the blocks would be
[] [+ v] [] :: operators :: reporter // :: reporter added for shape (otherwise broken)
[] [= v] [] :: operators :: boolean // :: boolean added for shape (otherwise broken)
[] [and v] [] :: operators :: boolean // same as above
not [] :: operators :: boolean // up twice
EDIT: Forgot to mention, but have this scratch wiki page that gives all the syntaxes
Last edited by Zydrolic (Oct. 31, 2023 14:19:47)
- BoyoolHarita
-
Scratcher
100+ posts
Operators Changes
bumping this because I feel like most people just ended up missing this
- MagicCoder330
-
Scratcher
1000+ posts
Operators Changes
I agree, would make it easier to fix the things. Also, maybe there should be an option to disable the other ones appearing, so just one of them appears in the block palate and you can just use the dropdown.
- medians
-
Scratcher
1000+ posts
Operators Changes
There was a feature in 2.0 and 1.x that would work kinda like this, when you right clicked some operator blocks, like the addition block, it would allow you to change it to another block. Yea I use that feature a lot:


Edit:
https://scratch.mit.edu/discuss/topic/336102/
Edit 2:
This also worked on lists and vars, which you can still do:




Edit:
https://scratch.mit.edu/discuss/topic/336102/
Edit 2:
This also worked on lists and vars, which you can still do:


Last edited by medians (Nov. 7, 2023 23:44:40)
- BoyoolHarita
-
Scratcher
100+ posts
Operators Changes
There was a feature in 2.0 and 1.x that would work kinda like this, when you right clicked some operator blocks, like the addition block, it would allow you to change it to another block. Yea I use that feature a lot:I'm not entirely sure why they removed that (honestly I didn't know that was a thing), maybe an engine change? Regardless, this would definitely be a doable way to do things seeing how it already exists in a way with
Edit:
https://scratch.mit.edu/discuss/topic/336102/
Edit 2:
This also worked on lists and vars, which you can still do:
([10 ^ v] () ::operators)
Last edited by BoyoolHarita (Nov. 8, 2023 15:12:40)
- cookieclickerer33
-
Scratcher
1000+ posts
Operators Changes
I don’t think we should have blocks that are made entirely of inputs
It would be really hard to test the values they return because there’s nowhere to click
And it would be very very hard to represent in syntax
It would be <()()()> as the block syntax
It would be really hard to test the values they return because there’s nowhere to click
And it would be very very hard to represent in syntax
It would be <()()()> as the block syntax
- PaperMarioFan2022
-
Scratcher
1000+ posts
Operators Changes
No worries. Just convert 2.0 from Flash to HTML5 or something better.(#11)[Oh no.]
2.0 used Flash though.
- cookieclickerer33
-
Scratcher
1000+ posts
Operators Changes
I don’t think we should have blocks that are made entirely of inputs
It would be really hard to test the values they return because there’s nowhere to click
And it would be very very hard to represent in syntax
It would be <()()()> as the block syntax
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Operators Changes
I don’t think we should have blocks that are made entirely of inputs
It would be really hard to test the values they return because there’s nowhere to click
And it would be very very hard to represent in syntax
It would be <()()()> as the block syntax
(join ((34.5) [* v] (2)::operators) [])
- -Expo
-
Scratcher
1000+ posts
Operators Changes
There was a feature in 2.0 and 1.x that would work kinda like this, when you right clicked some operator blocks, like the addition block, it would allow you to change it to another block. Yea I use that feature a lot:I'm not entirely sure why they removed that (honestly I didn't know that was a thing), maybe an engine change? Regardless, this would definitely be a doable way to do things seeing how it already exists in a way with
Edit:
https://scratch.mit.edu/discuss/topic/336102/
Edit 2:
This also worked on lists and vars, which you can still do:([10 ^ v] () ::operators)
I remember myself using this years ago. If this were to get reimplemented, I'd support.
- cookieclickerer33
-
Scratcher
1000+ posts
Operators Changes
That returns a string not a number (there is a difference) and just no, you shouldn’t have to use the join block to see what 5 + 2 isI don’t think we should have blocks that are made entirely of inputs
It would be really hard to test the values they return because there’s nowhere to click
And it would be very very hard to represent in syntax
It would be <()()()> as the block syntax(join ((34.5) [* v] (2)::operators) [])
- Discussion Forums
- » Suggestions
-
» Operators Changes







