Discuss Scratch

_RareScratch2_
Scratcher
100+ posts

Boolean variables :D

I agree.
`set <you mean like this?> to [0]`
Timesavers prob.
:)

edit: first post on page 7

Last edited by _RareScratch2_ (Aug. 7, 2020 09:31:05)

shift down
you are looking at my siggy
Scratch <– Click if you dont know the link to scratch.mit.edu
My profile <– Useful portal! Don't need to type in my personal page.
Come to the Chill shop! <– My shop. Only text sadly.
this took a long time for the rainbow colours and stuff
Join the Woah army

`r ::lista ::variablesr ::controle ::operatorss ::sensingc ::motionr ::looksa ::soundt ::none BOIIc ::listh ::variables2 ::control! ::operators`
Vanilla2011
Scratcher
100+ posts

Boolean variables :D

I agree
We could make the block like this:
`my variable ::variables boolean`
Tho there is an easy workaround.

Last edited by Vanilla2011 (Aug. 7, 2020 13:52:10)

Signed,
~Vanilla2011

`My browser / operating system: [Windows NT 10.0 v], [Chrome 85.0.4183.83 v], [No Flash version detected v]::reporter operators`
theevolutionary
New to Scratch
1 post

Boolean variables :D

On the topic of booleans:

I understood Scratch was to help make programming concepts and constructs easy to understand/use for a younger audience, and for the most part it does an excellent job.

Booleans are POTENTIALLY complex in application but they are on the idea that something is “true' or ”false'. ‘On’ or ‘Off’. Children understand that concept quite easily. What is HARDER to understand is expressions like “0 = 1” or “1 = 1”. By not having a variable that is “on” or “off” you often force a simple idea into a more abstract one. That is harder for children to understand as opposed to a simple light switch. You allow boolean concepts for sprites which is a good thing, but to not follow through and allow kids to make variables with the idea that something is “on' or ”off“ without sprites gets confusing for children because these things exist in their world.

So respectfully, I disagree that booleans are too 'complex” for children. On the contrary, I believe and have experienced children not understanding why they do not have simple booleans (on/off) variables which forces abstract workarounds to simple ideas in their Scratch “worlds”. Kids understand light switches, they understand the idea of “A” or “B”. By that definition, they already understand the concept of booleans. I would strongly encourage boolean variables with simple “true/false” settings, which maybe should include boolean only comparitors (to reduce programming complexity).

Nuff said. Cheers.
donotforgetmycode
Scratcher
100+ posts

Boolean variables :D

theevolutionary wrote:

On the topic of booleans:

I understood Scratch was to help make programming concepts and constructs easy to understand/use for a younger audience, and for the most part it does an excellent job.

Booleans are POTENTIALLY complex in application but they are on the idea that something is “true' or ”false'. ‘On’ or ‘Off’. Children understand that concept quite easily. What is HARDER to understand is expressions like “0 = 1” or “1 = 1”. By not having a variable that is “on” or “off” you often force a simple idea into a more abstract one. That is harder for children to understand as opposed to a simple light switch. You allow boolean concepts for sprites which is a good thing, but to not follow through and allow kids to make variables with the idea that something is “on' or ”off“ without sprites gets confusing for children because these things exist in their world.

So respectfully, I disagree that booleans are too 'complex” for children. On the contrary, I believe and have experienced children not understanding why they do not have simple booleans (on/off) variables which forces abstract workarounds to simple ideas in their Scratch “worlds”. Kids understand light switches, they understand the idea of “A” or “B”. By that definition, they already understand the concept of booleans. I would strongly encourage boolean variables with simple “true/false” settings, which maybe should include boolean only comparitors (to reduce programming complexity).

Nuff said. Cheers.
I agree with that

This is my signature
Highlight this text and press Control+Shift+Down to see more
`foreverif <you want boolean variables::#0f0> thensupport it at [https://scratch.mit.edu/discuss/topic/8618/]::lookselseswitch [you want boolean variables v]::#0f0`
https://scratch.mit.edu/discuss/topic/8618/

Be moist

le mi sinxa pu se citka lo palci gamguata

https://scratch.mit.edu/projects/197608276/

` _____                 _                     _                         _|     |               |_|                  _| |_                      |_|| | | |_   _     _____ _ _____ _____ _____|_   _|_   _ _____ _____     _ _____     _   _ _____ _____ _   _| | | | | | |   | ____| |  _  |  _  |____ | | | | | | |  ___|  _  |   | | ____|   | | | |  _  |  ___| | | || | | | |_| |   |____ | | |_| | | | |  _  | | |_| |_| | |   | ____|   | |____ |   | |_| | ____| |   | |_| ||_|_|_|___  |   |_____|_|___  |_| |_|_____| |___|_____|_|   |_____|   |_|_____|    |___||_____|_|   |___  |       ___| |            ___| |                                                                      ___| |      |_____|           |_____|                                                                     |_____| _____ _____ _____|  _  |_   _|  ___|| |_| | | | | | __|  _ |  | | | ||  || |_| |_| |_| |_| ||_____|_____|_____|`
ottobun
Scratcher
42 posts

Boolean variables :D

I guess there is a workaround

`foreverset var1 to <[a]=[a]>end<var1>define set var1 to <var1>`

dogeiscut
Scratcher
500+ posts

Boolean variables :D

I don't need this, and it would take up space in the editor. No support, also very easy work around is to just use regular varibles
`set [foo v] to [1]set [foo v] to [0]<(foo) = [1]><(foo) = [0]>`

peanut
Vibrato
Scratcher
1000+ posts

Boolean variables :D

dogeiscut wrote:

I don't need this, and it would take up space in the editor. No support, also very easy work around is to just use regular varibles
`set [foo v] to [1]set [foo v] to [0]<(foo) = [1]><(foo) = [0]>`
everything takes up space in the editor. terrible argument, there

Za-Chary wrote:

I'm going to close this suggestion as it is technically implemented and rejected at the same time.
dogeiscut
Scratcher
500+ posts

Boolean variables :D

Vibrato wrote:

dogeiscut wrote:

I don't need this, and it would take up space in the editor. No support, also very easy work around is to just use regular varibles
`set [foo v] to [1]set [foo v] to [0]<(foo) = [1]><(foo) = [0]>`
everything takes up space in the editor. terrible argument, there
ahem

tell this fella the same thing

(this was on a suggestion i made and i was trying to get revenge which i admit is quite stupid of me)

Last edited by dogeiscut (Aug. 24, 2020 15:13:05)

peanut
_RareScratch2_
Scratcher
100+ posts

Boolean variables :D

dogeiscut wrote:

I don't need this, and it would take up space in the editor. No support, also very easy work around is to just use regular varibles
`set [foo v] to [1]set [foo v] to [0]<(foo) = [1]><(foo) = [0]>`
What? You mean like this?
`set [boolean v] to [true] //Statement shows that boolean variable is true.set [boolean v] to [false] //Statement shows that boolean variable is false.(boolean) //Dosen't look like a boolean...boolean ::variables boolean //Like this [I realised you can use ::boolean :O]`

shift down
you are looking at my siggy
Scratch <– Click if you dont know the link to scratch.mit.edu
My profile <– Useful portal! Don't need to type in my personal page.
Come to the Chill shop! <– My shop. Only text sadly.
this took a long time for the rainbow colours and stuff
Join the Woah army

`r ::lista ::variablesr ::controle ::operatorss ::sensingc ::motionr ::looksa ::soundt ::none BOIIc ::listh ::variables2 ::control! ::operators`
donotforgetmycode
Scratcher
100+ posts

Boolean variables :D

dogeiscut wrote:

snip wrote:

ahem

tell this fella the same thing

(this was on a suggestion i made and i was trying to get revenge which i admit is quite stupid of me)
I support boolean variables because they're useful. I don't support the topic that post is on because it wouldn't really be useful

Last edited by donotforgetmycode (Aug. 25, 2020 12:20:07)

This is my signature
Highlight this text and press Control+Shift+Down to see more
`foreverif <you want boolean variables::#0f0> thensupport it at [https://scratch.mit.edu/discuss/topic/8618/]::lookselseswitch [you want boolean variables v]::#0f0`
https://scratch.mit.edu/discuss/topic/8618/

Be moist

le mi sinxa pu se citka lo palci gamguata

https://scratch.mit.edu/projects/197608276/

` _____                 _                     _                         _|     |               |_|                  _| |_                      |_|| | | |_   _     _____ _ _____ _____ _____|_   _|_   _ _____ _____     _ _____     _   _ _____ _____ _   _| | | | | | |   | ____| |  _  |  _  |____ | | | | | | |  ___|  _  |   | | ____|   | | | |  _  |  ___| | | || | | | |_| |   |____ | | |_| | | | |  _  | | |_| |_| | |   | ____|   | |____ |   | |_| | ____| |   | |_| ||_|_|_|___  |   |_____|_|___  |_| |_|_____| |___|_____|_|   |_____|   |_|_____|    |___||_____|_|   |___  |       ___| |            ___| |                                                                      ___| |      |_____|           |_____|                                                                     |_____| _____ _____ _____|  _  |_   _|  ___|| |_| | | | | | __|  _ |  | | | ||  || |_| |_| |_| |_| ||_____|_____|_____|`
Nambaseking01
Scratcher
1000+ posts

Boolean variables :D

Like so many other people have said, just use a normal variable and set it to true or false. If you feel that it would be hard to see the difference between normal variables and the variable that you made a boolean, you can just name them “boolean”, or set it as the second word of the variable after the function you're using it for (like “runBoolean”).
Scratcher
71 posts

Boolean variables :D

alexphan wrote:

drmcw wrote:

alexphan wrote:

One question: WHAT ARE BOOLEAN VARIABLES???????!?!?!?:o

A variable that can be either true or false. If it was a Scratch block it would have pointy ends.

So that's a boolean variable?
I kind of support because they're timesavers.

There shold be a dropdown, instead of putting strings.

So the block is like this: [set to
false

Then you can put it in a boolean insert, like
if <touching boy?> or
repeat until <touching boy?>
another type:
`if <[5]=[10]> then set [does 5 equal 10? v] to [true]elseset [does 5 equal 10? v] to [false] end`

cooldude-222
Scratcher
100+ posts

Boolean variables :D

alexphan wrote:

drmcw wrote:

alexphan wrote:

One question: WHAT ARE BOOLEAN VARIABLES???????!?!?!?:o

A variable that can be either true or false. If it was a Scratch block it would have pointy ends.

So that's a boolean variable?
I kind of support because they're timesavers.

There shold be a dropdown, instead of putting strings.

So the block is like this: [set to
false

Then you can put it in a boolean insert, like
if <touching boy?> or
repeat until <touching boy?>
another type:
`if <[5]=[10]> then set [does 5 equal 10? v] to [true]elseset [does 5 equal 10? v] to [false] end`
You could just do
`set [Does 5 = 10 v] to <[5] = [10]>`

Check out…
Scratcher
20 posts

Boolean variables :D

`<my boolean::grey> <☁ my boolean::grey> `
`set [my boolean v] to <>::grey`
`toggle [my boolean v]::grey`
`show boolean [my boolean v]::grey`
`hide boolean [my boolean v]::grey`

Examples of my work:
cooldude-222
Scratcher
100+ posts

Boolean variables :D

`<my boolean::grey> <☁ my boolean::grey> `
`set [my boolean v] to <>::grey`
`toggle [my boolean v]::grey`
`show boolean [my boolean v]::grey`
`hide boolean [my boolean v]::grey`
What does the toggle block do

Check out…
trieuminh
Scratcher
100+ posts

Boolean variables :D

`<my boolean::grey> <☁ my boolean::grey> set [my boolean v] to <>::greytoggle [my boolean v]::greyshow boolean [my boolean v]::greyhide boolean [my boolean v]::greyset [my boolean v] to true::greyset [my boolean v] to false::grey`
More.

Last edited by kaj the day before yesterday 24:60:60

bold italic underline strikethrough

Someone wrote:

Something.
Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)
`define somethingforeverset pen color to [#0b4861]play sound [meow v]change [color v] effect by (25)go [before v]  [forever v] :: motionpen::penmusic::musicend`

Ocean OS
Be moist
56/100 posts |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 56%
Rainbow: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
trieuminh
Scratcher
100+ posts

Boolean variables :D

cooldude-222 wrote:

`<my boolean::grey> <☁ my boolean::grey> `
`set [my boolean v] to <>::grey`
`toggle [my boolean v]::grey`
`show boolean [my boolean v]::grey`
`hide boolean [my boolean v]::grey`
What does the toggle block do
If it's false it makes it true. If it's true it makes it false.

Last edited by kaj the day before yesterday 24:60:60

bold italic underline strikethrough

Someone wrote:

Something.
Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)
`define somethingforeverset pen color to [#0b4861]play sound [meow v]change [color v] effect by (25)go [before v]  [forever v] :: motionpen::penmusic::musicend`

Ocean OS
Be moist
56/100 posts |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 56%
Rainbow: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
lapisi
Scratcher
86 posts

Boolean variables :D

`<my boolean::grey> <☁ my boolean::grey> `
`set [my boolean v] to <>::grey`
`toggle [my boolean v]::grey`
`show boolean [my boolean v]::grey`
`hide boolean [my boolean v]::grey`
Wouldn't boolean variables be orange because they are in the variables catagory?

Generation 3: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.

`＞﹏＜:: ring :: #85ffd7 // this is Ringy, she will protect my signature from evil kumquats when she is ready`

(Put this in your signature and add one word to the paragraph) Sparrows, Rogue

Check out the Scypod Roleplay that I had to change the name of here
donotforgetmycode
Scratcher
100+ posts

Boolean variables :D

lapisi wrote:

`<my boolean::grey> <☁ my boolean::grey> `
`set [my boolean v] to <>::grey`
`toggle [my boolean v]::grey`
`show boolean [my boolean v]::grey`
`hide boolean [my boolean v]::grey`
Wouldn't boolean variables be orange because they are in the variables catagory?
Lists are also in the variables category

This is my signature
Highlight this text and press Control+Shift+Down to see more
`foreverif <you want boolean variables::#0f0> thensupport it at [https://scratch.mit.edu/discuss/topic/8618/]::lookselseswitch [you want boolean variables v]::#0f0`
https://scratch.mit.edu/discuss/topic/8618/

Be moist

le mi sinxa pu se citka lo palci gamguata

https://scratch.mit.edu/projects/197608276/

` _____                 _                     _                         _|     |               |_|                  _| |_                      |_|| | | |_   _     _____ _ _____ _____ _____|_   _|_   _ _____ _____     _ _____     _   _ _____ _____ _   _| | | | | | |   | ____| |  _  |  _  |____ | | | | | | |  ___|  _  |   | | ____|   | | | |  _  |  ___| | | || | | | |_| |   |____ | | |_| | | | |  _  | | |_| |_| | |   | ____|   | |____ |   | |_| | ____| |   | |_| ||_|_|_|___  |   |_____|_|___  |_| |_|_____| |___|_____|_|   |_____|   |_|_____|    |___||_____|_|   |___  |       ___| |            ___| |                                                                      ___| |      |_____|           |_____|                                                                     |_____| _____ _____ _____|  _  |_   _|  ___|| |_| | | | | | __|  _ |  | | | ||  || |_| |_| |_| |_| ||_____|_____|_____|`
trieuminh
Scratcher
100+ posts

Boolean variables :D

trieuminh wrote:

-snip-
`<my boolean::#b0781e>`
How does that look?

Last edited by kaj the day before yesterday 24:60:60

bold italic underline strikethrough

Someone wrote:

Something.
Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)
`define somethingforeverset pen color to [#0b4861]play sound [meow v]change [color v] effect by (25)go [before v]  [forever v] :: motionpen::penmusic::musicend`

Ocean OS
Be moist