Discuss Scratch

Euglena73
Scratcher
1000+ posts

Da "Null" block!!!

I_LOVE_TO_MAKE_STUFF wrote:

First, I need to understand what “null” is. I've seen it a lot in JavaScript, but I don't understand it.
Null in programming languages ​​(e.g. the above-mentioned Java Script) means nothingness.
k0d3rrr
Scratcher
1000+ posts

Da "Null" block!!!

This could be useful. Semi-support.
I don't feel like adding more to that because I'm too tired to think.
hi875230163394
Scratcher
1000+ posts

Da "Null" block!!!

Copycat96 wrote:

null []
i dont know what that would do
Please avoid necroposting

how has nobody noticed this?
I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

Da "Null" block!!!

hi875230163394 wrote:

Copycat96 wrote:

null []
i dont know what that would do
Please avoid necroposting

how has nobody noticed this?
There is no such thing as necroposting in the suggestions forums
7salad3salad
Scratcher
1000+ posts

Da "Null" block!!!

I_LOVE_TO_MAKE_STUFF wrote:

hi875230163394 wrote:

Copycat96 wrote:

null []
i dont know what that would do
Please avoid necroposting

how has nobody noticed this?
There is no such thing as necroposting in the suggestions forums
This is true, as long as it contributes to the topic. Lets stay on topic though.
I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

Da "Null" block!!!

After doing some research, it looks like it returns “true” all the time (I might be wrong). This looks like it could be useful. As I said, it returns true all the time, but couldn't it be replaced with this?:

<(foo) = (foo)>

Please tell me if I have the wrong definition. I will share more then.
Kono_Muda_Da
Scratcher
100+ posts

Da "Null" block!!!

what about this?

stop [ other scripts in sprite v]


lolecksdeehaha
Scratcher
1000+ posts

Da "Null" block!!!

I_LOVE_TO_MAKE_STUFF wrote:

After doing some research, it looks like it returns “true” all the time (I might be wrong). This looks like it could be useful. As I said, it returns true all the time, but couldn't it be replaced with this?:

<(foo) = (foo)>

Please tell me if I have the wrong definition. I will share more then.
This is meant to stop a currently running script; you're thinking of a reporter. Null is actually a falsy value; It returns ‘false’ (or, at least, is converted to that), not true.
I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

Da "Null" block!!!

lolecksdeehaha wrote:

I_LOVE_TO_MAKE_STUFF wrote:

-snip-

Please tell me if I have the wrong definition. I will share more then.
This is meant to stop a currently running script; you're thinking of a reporter. Null is actually a falsy value; It returns ‘false’ (or, at least, is converted to that), not true.
This is meant to stop a currently running script; you're thinking of a reporter.
So like this?:
if <> then
stop [this script v]
end

Null is actually a falsy value; It returns ‘false’ (or, at least, is converted to that), not true

So:

<not <(foo) = (foo)>>
Jackson49_test
Scratcher
100+ posts

Da "Null" block!!!

Bump
lion334
Scratcher
100+ posts

Da "Null" block!!!

Can y'all stop necropostin? This Thread was made 6 years ago

Last edited by lion334 (April 4, 2022 17:50:39)

Epsilon_3
Scratcher
500+ posts

Da "Null" block!!!

lion334 wrote:

Can y'all stop necropostin? This Thread was made 6 years ago
Necroposting is not a thing in this forum.
twogadugary
Scratcher
100+ posts

Da "Null" block!!!

I don't fully understand what this is supposed to even be or how it would be implemented. It's one of those that would be confusing for both new scratchers and the Scratch Team.
Epsilon_3
Scratcher
500+ posts

Da "Null" block!!!

twogadugary wrote:

I don't fully understand what this is supposed to even be or how it would be implemented. It's one of those that would be confusing for both new scratchers and the Scratch Team.
And Scratchers
BadBrad119
Scratcher
31 posts

Da "Null" block!!!

All null blocks I know
say []
<<> and <>>
set pen color to []
Historic:
loud?
sensor (☁ score)

Last edited by BadBrad119 (April 5, 2023 18:49:22)

BadBrad119
Scratcher
31 posts

Da "Null" block!!!

full code:

when green flag clicked
if <loud?> then
stop [all v]
end
when [. v] key pressed
go <sensor [hi]>
(there is a fake block! can you spot it!)

Last edited by BadBrad119 (April 5, 2023 18:53:56)

BadBrad119
Scratcher
31 posts

Da "Null" block!!!

blocks:
. . . //describes that nothing is happening
[] //a custom block that is empty
all at once //this is useless however it can be used to delete clones instantly
null [] //this I think just turns the script null

Last edited by BadBrad119 (April 5, 2023 19:14:05)

rdococ
Scratcher
1000+ posts

Da "Null" block!!!

“Null” isn't a very descriptive name for this block- I couldn't guess what it does without trying it out! I would name it “stop selected script” instead.

No other block requires you to select a specific script as input- this strikes me as potentially very confusing to new users.

In all the use cases I can think of, it would be better to use variables, or maybe a dedicated sprite running “stop other scripts in sprite”. Do you have a particular use in mind?

Last edited by rdococ (April 5, 2023 19:29:31)

INSERT-USER_NAME
Scratcher
1000+ posts

Da "Null" block!!!

What would this do?
sqioosschoolaccount
Scratcher
13 posts

Da "Null" block!!!

this is still possible

Powered by DjangoBB