Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Operation block Being Wrong
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
In scratch there is a = block usually every number is equals to itself, so it is true. but NaN exists. NaN stands for Not A Number and is not equivalent to itself. (see for yourself. search it on google) but when it is in scratch…
it returns true. this contradicts the google's correct answer and is wrong. also 0/0 is nan. so when I tried
<[NaN] = [NaN]>
it returns true. this contradicts the google's correct answer and is wrong. also 0/0 is nan. so when I tried
<((0) / (0)) = ((0) / (0))>it still returned true. this is completely wrong and should be fixed
Last edited by foggystar128 (Feb. 12, 2024 17:54:44)
- Knightbot63
- Scratcher
1000+ posts
Operation block Being Wrong
The equal sign uses Javascript's I believe which handles strings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
strings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the codestrings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
I don't want it to use strings. I want it to use mathI simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the codestrings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
basically. it tries to compare the letters but not the actual value of NaN?I don't want it to use strings. I want it to use mathI simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the codestrings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
OH! A NEW IDEA POPPED INTO MY HEAD INSTEAD OF CHECKING FOR EQUALS. check if it is not bigger or smaller than say? 2 and check if it is not bigger or smaller than say? 123 if it is true than it is NaN. I Will update if it worksbasically. it tries to compare the letters but not the actual value of NaN?I don't want it to use strings. I want it to use mathI simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the codestrings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- foggystar128
- Scratcher
26 posts
Operation block Being Wrong
I Have still not found anything that would work. I don't even know If it is possibleOH! A NEW IDEA POPPED INTO MY HEAD INSTEAD OF CHECKING FOR EQUALS. check if it is not bigger or smaller than say? 2 and check if it is not bigger or smaller than say? 123 if it is true than it is NaN. I Will update if it worksbasically. it tries to compare the letters but not the actual value of NaN?I don't want it to use strings. I want it to use mathI simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the codestrings e.g. Value = Value will return true no matter the casing this is NOT strict equality. It's not being wrong at all in this case, just a bit confusing at first.is there a way to make this not the case? The equal sign uses Javascript's I believe which handles
- Discussion Forums
- » Bugs and Glitches
- » Operation block Being Wrong