Discuss Scratch

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…
<[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

Knightbot63 wrote:

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.
is there a way to make this not the case?
foggystar128
Scratcher
26 posts

Operation block Being Wrong

foggystar128 wrote:

Knightbot63 wrote:

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.
is there a way to make this not the case?
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the code
foggystar128
Scratcher
26 posts

Operation block Being Wrong

foggystar128 wrote:

foggystar128 wrote:

Knightbot63 wrote:

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.
is there a way to make this not the case?
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the code
I don't want it to use strings. I want it to use math
foggystar128
Scratcher
26 posts

Operation block Being Wrong

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

Knightbot63 wrote:

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.
is there a way to make this not the case?
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the code
I don't want it to use strings. I want it to use math
basically. it tries to compare the letters but not the actual value of NaN?
foggystar128
Scratcher
26 posts

Operation block Being Wrong

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

Knightbot63 wrote:

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.
is there a way to make this not the case?
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the code
I don't want it to use strings. I want it to use math
basically. it tries to compare the letters but not the actual value of NaN?
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 works
foggystar128
Scratcher
26 posts

Operation block Being Wrong

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

foggystar128 wrote:

Knightbot63 wrote:

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.
is there a way to make this not the case?
I simply wanna use NaN for scratch Encryption to make a passkey that you don't automatically guess just by looking in the code
I don't want it to use strings. I want it to use math
basically. it tries to compare the letters but not the actual value of NaN?
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 works
I Have still not found anything that would work. I don't even know If it is possible

Powered by DjangoBB