Discuss Scratch

TheSmartGuy1234
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

TheSmartGuy1234 wrote:

No support.
<[ ] :: control>
is just
<[] = [true]>
and it is too complex. It's like a
go to center:: motion
block when you can just do
go to x: (0) y: (0)
(that one got rejected because then new scratchers will have to learn the coordinates system) also how are new scratchers supposed to understand this block? There is literally no text explaining it.
I actually disagree with past me.

because of MIGHT JAVAsCRIPT

<[] is truthy::operators>

Yep!

P.S. 12:2? nope 6:1!
Eagle138
Scratcher
500+ posts

Better boolean inputs — 12:2 Support

but if input = 57 and you do
if (input) then

end
you end up with a statement that says ‘if 57 then’…?

set [input v] to [bananas are falling from the sky]
if (input) then
...? :: grey
end

Last edited by Eagle138 (April 6, 2022 02:45:09)

historical_supa
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Support, this also ties in with the <true?> and <false?> suggestions. Would be useful for many advanced projects.

Mockup:
cubeupload is down so i'll add it later
TheSmartGuy1234
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Eagle138 wrote:

but if input = 57 and you do
if (input) then

end
you end up with a statement that says ‘if 57 then’…?

set [input v] to [bananas are falling from the sky]
if (input) then
...? :: grey
end
well due to the programming world it will be true
Eagle138
Scratcher
500+ posts

Better boolean inputs — 12:2 Support

TheSmartGuy1234 wrote:

Eagle138 wrote:

but if input = 57 and you do
if (input) then

end
you end up with a statement that says ‘if 57 then’…?

set [input v] to [bananas are falling from the sky]
if (input) then
...? :: grey
end
well due to the programming world it will be true
ok i tested it, you're right
but what if people want to use the 0/1 (binary) method for true or false, as people often do on Scratch, or they change the capitalisation? Then both methods will return true
Idk, I just think that it could be confusing for new Scratchers.
TheSmartGuy1234
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Eagle138 wrote:

TheSmartGuy1234 wrote:

Eagle138 wrote:

but if input = 57 and you do
if (input) then

end
you end up with a statement that says ‘if 57 then’…?

set [input v] to [bananas are falling from the sky]
if (input) then
...? :: grey
end
well due to the programming world it will be true
ok i tested it, you're right
but what if people want to use the 0/1 (binary) method for true or false, as people often do on Scratch, or they change the capitalisation? Then both methods will return true
Idk, I just think that it could be confusing for new Scratchers.
Okay letme explain

PROGRAMMING WORLD!!!
“”, 0 and false is false
EVERYTHING ELSE is true.
yes even “1+1=1” because it's a string
ScolderCreations
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Actually, you can put “item X of list” inside Boolean inputs, but not other kinds of variables for some reason.
Eagle138
Scratcher
500+ posts

Better boolean inputs — 12:2 Support

TheSmartGuy1234 wrote:

Eagle138 wrote:

snip
Okay letme explain

PROGRAMMING WORLD!!!
“”, 0 and false is false
EVERYTHING ELSE is true.
yes even “1+1=1” because it's a string
okok i get it
but in the programming world there is a difference between “false” and false
in Scratch there is not
historical_supa
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support



here is the epic mockup
OhOkSir12345
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Bump
TheSmartGuy1234
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Eagle138 wrote:

TheSmartGuy1234 wrote:

Eagle138 wrote:

snip
Okay letme explain

PROGRAMMING WORLD!!!
“”, 0 and false is false
EVERYTHING ELSE is true.
yes even “1+1=1” because it's a string
okok i get it
but in the programming world there is a difference between “false” and false
in Scratch there is not
so because scratch is simple* “false” = false


“false” == false
> true
thus scratch shall work dat way
TheSmartGuy1234
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

<is () true?::operators>
here is the epicer mockup
mumu245
Scratcher
1000+ posts

Better boolean inputs — 12:2 Support

Agree. If the variable is True, a number above zero or any non-empty string it is true. Otherwise it is false.

Powered by DjangoBB