Discuss Scratch
- Discussion Forums
- » Suggestions
- » "is exactly equal to" block.
- AlfabetonsOfficial
-
Scratcher
100+ posts
"is exactly equal to" block.
Note: This is different from the equals block. The equals block returns true if there is a capital A and a lowercase a and also returns true for:
<[01]=[1]>I would like to suggest this block:
<[1e3]=[1000]>
<[2.0]=[2]>
<[1 ] = [1]>
<[a ]=[a]> // returns false though for some reason.
<[] exactly = [] :: operators>It would return true ONLY if the strings are the exact same, no leading zeros in numbers, no E notation, even case sensitivity.
<[A] exactly = [a] :: operators>would all return false, but
<[01] exactly = [1] :: operators>
<[2.0] exactly = [2] :: operators>
<[1e3] exactly = [1000] :: operators>
<[1 ] exactly = [1] :: operators>
<[1] exactly = [1] :: operators>would return true because there is no modification between the two strings. This would be helpful for quizzes, prompts, etc.
- TheClaw7654
-
Scratcher
500+ posts
"is exactly equal to" block.
support, useful if you want to put secret codes in your games with exact cAPitaLiZmS
Last edited by TheClaw7654 (June 6, 2021 15:02:01)
- fdreerf
-
Scratcher
1000+ posts
"is exactly equal to" block.
I think the block should use the “exactly equal to” symbol, ≡, since it's much shorter.
<[] ≡ [] ::operators>
- DarthVader4Life
-
Scratcher
1000+ posts
"is exactly equal to" block.
Support![j] Why?! Just tell us why! AHHHHHHHHHHH [/j]
Seriously, Why? You have to state why otherwise it's spam.
- badilreal
-
Scratcher
100+ posts
"is exactly equal to" block.
support, useful if you want to put secret codes in your games with exact cAPitaLiZmSdo u mean case sensitive
- CITHCrate
-
Scratcher
57 posts
"is exactly equal to" block.
i think it would look better as this
<[] == [] :: operators>
- mmnagelia
-
Scratcher
100+ posts
"is exactly equal to" block.
I think the block should use the “exactly equal to” symbol, ≡, since it's much shorter.I agree. Its shorter and more recognizable.<[] ≡ [] ::operators>
Anyways, I support since it would be helpful for codes.
i think it would look better as thisI don't like that, since in many programming languages, that means the same as<[] == [] :: operators>
<[] = []>block. @fdreerf is better imo.
- Sheep_maker
-
Scratcher
1000+ posts
"is exactly equal to" block.
I think the block should use the “exactly equal to” symbol, ≡, since it's much shorter.Hmm, Scratch block names in English typically only use characters found on the US keyboard. Also, I feel like when scanning code, the difference between ≡ and = might be small and hard to notice. New Scratchers probably won't be familiar with the ≡ symbol, though I suppose the same could be argued for * or / or mod. I usually don't come across the ≡ symbol as often though<[] ≡ [] ::operators>
I feel like a longer name (or perhaps default values are enough) is more descriptive of how the block differs from the _ = _ block
<[apple] matches [Apple] exactly?::operators>
How would this block deal with values of different types? For example, would these report true or false? (the _ = _ block reports true for all of these)
<(() + (1)) exactly = [1.0]::operators>
<(() + ()) exactly = [0e123456]::operators>
<<not <>> exactly = (join [true] [])::operators>
<<not <>> exactly = (join [1] [])::operators>
- Westech60
-
Scratcher
84 posts
"is exactly equal to" block.
Support. This probably could be used in many ways
- Maximouse
-
Scratcher
1000+ posts
"is exactly equal to" block.
How would this block deal with values of different types? For example, would these report true or false? (the _ = _ block reports true for all of these)A similar block in Snap! reports true when comparing different types of numbers and false when comparing Booleans with strings:<(() + (1)) exactly = [1.0]::operators>
<(() + ()) exactly = [0e123456]::operators>
<<not <>> exactly = (join [true] [])::operators>
<<not <>> exactly = (join [1] [])::operators>

But because the suggestion mentions leading zeroes and scientific notations, I think the suggested block should report false in all four cases.
- AlfabetonsOfficial
-
Scratcher
100+ posts
"is exactly equal to" block.
1. False, because 1.0 has a “.0” at the end and 1 doesn't.I think the block should use the “exactly equal to” symbol, ≡, since it's much shorter.Hmm, Scratch block names in English typically only use characters found on the US keyboard. Also, I feel like when scanning code, the difference between ≡ and = might be small and hard to notice. New Scratchers probably won't be familiar with the ≡ symbol, though I suppose the same could be argued for * or / or mod. I usually don't come across the ≡ symbol as often though<[] ≡ [] ::operators>
I feel like a longer name (or perhaps default values are enough) is more descriptive of how the block differs from the _ = _ block<[apple] matches [Apple] exactly?::operators>
How would this block deal with values of different types? For example, would these report true or false? (the _ = _ block reports true for all of these)<(() + (1)) exactly = [1.0]::operators>
<(() + ()) exactly = [0e123456]::operators>
<<not <>> exactly = (join [true] [])::operators>
<<not <>> exactly = (join [1] [])::operators>
2. False, because 0e123456 has an “e123456” at the end.
3. True.
4. False, because booleans either report “true” or “false”, not numbers.
- gosoccerboy5
-
Scratcher
1000+ posts
"is exactly equal to" block.
I think the block should use the “exactly equal to” symbol, ≡, since it's much shorter.It is admittedly shorter, but it may be harder to read quickly, and would probably be confusing to new scratchers or even anyone else. “Exactly equals” gets the idea across perfectly. (I can't believe I just said “confusing to new scratchers” >.<)<[] ≡ [] ::operators>
i think it would look better as thisin my opinion that would be similarly confusing.<[] == [] :: operators>
Last edited by gosoccerboy5 (June 7, 2021 20:39:01)
- -Rex-
-
Scratcher
500+ posts
"is exactly equal to" block.
What about
[1] exactly = ((1) * (1)) :: boolean operatorsand
[1] exactly = ((1.0) * (1.0)) :: boolean operatorsWould the block return false in both cases?
((1) * (1)) exactly = ((1.0) * (1.0)) :: boolean operatorsDoes the block return true?
Last edited by -Rex- (June 7, 2021 23:40:52)
- AlfabetonsOfficial
-
Scratcher
100+ posts
"is exactly equal to" block.
What aboutThe booleans depend on what the reporter blocks REPORT, not its looks. So, all three of them will return true.[1] exactly = ((1) * (1)) :: boolean operatorsand[1] exactly = ((1.0) * (1.0)) :: boolean operatorsWould the block return false in both cases?((1) * (1)) exactly = ((1.0) * (1.0)) :: boolean operatorsDoes the block return true?
- -Rex-
-
Scratcher
500+ posts
"is exactly equal to" block.
The first two compare a string to a number. Why would they return true? Also, 1 and 1.0 will evaluate to the same number because Scratch does not support integers.What aboutThe booleans depend on what the reporter blocks REPORT, not its looks. So, all three of them will return true.[1] exactly = ((1) * (1)) :: boolean operatorsand[1] exactly = ((1.0) * (1.0)) :: boolean operatorsWould the block return false in both cases?((1) * (1)) exactly = ((1.0) * (1.0)) :: boolean operatorsDoes the block return true?
Last edited by -Rex- (June 7, 2021 23:42:46)
- han614698
-
Scratcher
1000+ posts
"is exactly equal to" block.
Comparing a string to a number doesn’t matter in the case they both are “1”.The first two compare a string to a number. Why would they return true? Also, 1 and 1.0 will evaluate to the same number because Scratch does not support integers.What aboutThe booleans depend on what the reporter blocks REPORT, not its looks. So, all three of them will return true.[1] exactly = ((1) * (1)) :: boolean operatorsand[1] exactly = ((1.0) * (1.0)) :: boolean operatorsWould the block return false in both cases?((1) * (1)) exactly = ((1.0) * (1.0)) :: boolean operatorsDoes the block return true?
- Discussion Forums
- » Suggestions
-
» "is exactly equal to" block.