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)


pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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.

Working on an RPG. Consistently losing followers because of inactivity.
I head to forums time-to-time. Not as much as I used to.
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?

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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?

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above
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

pls play my games and stuff
fish.exe
you fish and you get fishes.
https://scratch.mit.edu/projects/1036412622/
if <fishing> then
play the game above

Powered by DjangoBB