Discuss Scratch
- Discussion Forums
- » Suggestions
- » Add a Not Equal To operator block
- DooplisBlue
-
New Scratcher
2 posts
Add a Not Equal To operator block
Hi! I'm DooplisBlue, and I've been using Scratch through different accounts (I always forget passwords when switching computers) for about, well, 5 years.
It has occured to me, after 5 years of using the language, that there is no operator block that checks if a value is NOT equal to a given value.
Instead, in order to do such a thing, I would have to do this:
- the variable “value” is LESS than 0
- OR the variable “value” is MORE than 0
That's a lot of excess junk that could be avoided just by adding a != block.
I think adding such a block would make things a LOT easier, such as eliminating redundancy in RANDOM loops.
I think it would help beginners make value checkers a lot easier, too.
Please consider adding this!
It has occured to me, after 5 years of using the language, that there is no operator block that checks if a value is NOT equal to a given value.
Instead, in order to do such a thing, I would have to do this:
if <<(value) < [0]> or <(value) > [0]>> thenThe code block will broadcast the message “ValueNotZero” IF:
broadcast [ValueNotZero]
end
- the variable “value” is LESS than 0
- OR the variable “value” is MORE than 0
That's a lot of excess junk that could be avoided just by adding a != block.
I think adding such a block would make things a LOT easier, such as eliminating redundancy in RANDOM loops.
I think it would help beginners make value checkers a lot easier, too.
Please consider adding this!
- undeterminstic
-
Scratcher
1000+ posts
Add a Not Equal To operator block
easy workaround
<not <[] = []>>
- gdpr7314264727b19c01a53ed58b
-
Scratcher
1000+ posts
Add a Not Equal To operator block
Actually, this is why we have the “not <>” block in operators.
While I see this would save atleast a singular block, I doubt it's really all that neccasary.
EDIT: Ninja'd.
<not <>>This block works perfectly fine as you'd expect, so if you for example don't want var1 to equal 3 for some checksum, then you can just simply add an equals operator, the variable and the value…
<not <(var1) = [3]>>And you have it done.
While I see this would save atleast a singular block, I doubt it's really all that neccasary.
EDIT: Ninja'd.
Last edited by gdpr7314264727b19c01a53ed58b (Dec. 19, 2023 16:28:59)
- gdfsgdfsgdfg
-
Scratcher
1000+ posts
Add a Not Equal To operator block
ok fr though
why do we have
its the same as why do we have to pay for a bottle of water
when we can just get water from the tap for free
it’s because of convenience
So you don’t have to do multiple workarounds
for a messy thing
why do we have
go to x: (0) y: (0)if we can do this
set x to (0)once again its called convenience
set y to (0)
its the same as why do we have to pay for a bottle of water
when we can just get water from the tap for free
it’s because of convenience
So you don’t have to do multiple workarounds
for a messy thing
Last edited by gdfsgdfsgdfg (Dec. 19, 2023 17:48:51)
- Xzillox
-
Scratcher
1000+ posts
Add a Not Equal To operator block
ok fr thoughThe not < > block is a lot more versatile than the go to x() y () block though
why do we havego to x: (0) y: (0)if we can do thisset x to (0)once again its called convenience
set y to (0)
its the same as why do we have to pay for a bottle of water
when we can just get water from the tap for free
it’s because of convenience
- DooplisBlue
-
New Scratcher
2 posts
Add a Not Equal To operator block
Actually, this is why we have the “not <>” block in operators.Forgot the “not” block existed, my personal fault. Still, it just feels weird…<not <>>This block works perfectly fine as you'd expect, so if you for example don't want var1 to equal 3 for some checksum, then you can just simply add an equals operator, the variable and the value…<not <(var1) = [3]>>And you have it done.
While I see this would save atleast a singular block, I doubt it's really all that neccasary.
EDIT: Ninja'd.
- gdfsgdfsgdfg
-
Scratcher
1000+ posts
Add a Not Equal To operator block
The not < > block is a lot more versatile than the go to x() y () block thoughI was saying the reason that convenience is better than workaroundablity
Last edited by gdfsgdfsgdfg (Dec. 19, 2023 17:48:16)
- yadayadayadagoodbye
-
Scratcher
1000+ posts
Add a Not Equal To operator block
ok fr thoughBecause thats not completely redundant
why do we havego to x: (0) y: (0)if we can do thisset x to (0)once again its called convenience
set y to (0)
its the same as why do we have to pay for a bottle of water
when we can just get water from the tap for free
it’s because of convenience
the addition of the x: y: block wont make the X and the Y block pointless, nether would the inverse, yet the addition of a “not equals” block would be completely redundant to the not block's function.
- gdfsgdfsgdfg
-
Scratcher
1000+ posts
Add a Not Equal To operator block
Because thats not completely redundantIt was saying that convenience is better can workaroundablity
the addition of the x: y: block wont make the X and the Y block pointless, nether would the inverse, yet the addition of a “not equals” block would be completely redundant to the not block's function.
so everything will be clean
- yadayadayadagoodbye
-
Scratcher
1000+ posts
Add a Not Equal To operator block
everything except the block palletBecause thats not completely redundantIt was saying that convenience is better can workaroundablity
the addition of the x: y: block wont make the X and the Y block pointless, nether would the inverse, yet the addition of a “not equals” block would be completely redundant to the not block's function.
so everything will be clean
if we add this, why dont we also get “Not greator then” “Not less then” “Nand” “Nor” “Not touching” and all those other blocks?
- Xzillox
-
Scratcher
1000+ posts
Add a Not Equal To operator block
Yes, but the not < > block is convenient for many purposes. A != block would be very easily workaroundable (that's not a word) and, as yadayadayadagoodbye said, would be very redundant.The not < > block is a lot more versatile than the go to x() y () block thoughI was saying the reason that convenience is better than workaroundablity
Last edited by Xzillox (Dec. 19, 2023 21:21:28)
- unmissable
-
Scratcher
1000+ posts
Add a Not Equal To operator block
I honestly think for once that ≠ would be useful. Even with an easy workaround, why not? But then they'd have to add stuff like ≥ so yeah semi support
- Xzillox
-
Scratcher
1000+ posts
Add a Not Equal To operator block
Even with an easy workaround, why not?Because the workaround is so easy that the block would just be redundant and cause clutter. From the For Developers page:
Despite the common drive to add more features to software products, we have found that reducing the number of features often improves the user experience. What initially seems like a constraint or limitation can foster new forms of creativity.The ST doesn't want to add unneeded blocks. I think the workaround is easy enough that the last sentence of the quote applies here: What initially seems like a constraint or limitation can foster new forms of creativity.
Last edited by Xzillox (Dec. 20, 2023 00:18:19)
- medians
-
Scratcher
1000+ posts
Add a Not Equal To operator block
Because thats not completely redundantAlso, if pen is down the 2 blocks can be different than go to x: () y: ().
the addition of the x: y: block wont make the X and the Y block pointless, nether would the inverse, yet the addition of a “not equals” block would be completely redundant to the not block's function.
Last edited by medians (Dec. 20, 2023 01:08:23)
- Discussion Forums
- » Suggestions
-
» Add a Not Equal To operator block