Discuss Scratch
- Discussion Forums
- » Suggestions
- » Boolean variables :D
- TO0601
-
Scratcher
55 posts
Boolean variables :D
Maybe:WARNING!!!set (boolean var v) to (true v)
set (☁ boolean var v) to (true v)
set (boolean var v) to (false v)
set checkbox color of (boolean var v) to [#01a15b]::variables //checkboxes would represent boolean vars as a readout
<boolean var::variables>Also, you could already do this with regular cloud variablesAre cloud boolean variables included in this suggestion?I feel like it would not really cause any problems, as they would only be able to have two values (less than with regular cloud variables)
this block is not real
- jmdzti_0-0
-
Scratcher
1000+ posts
Boolean variables :D
WARNING!!!we can tell??
this block is not real
Last edited by jmdzti_0-0 (Aug. 9, 2025 09:15:52)
- Toodchop
-
Scratcher
100+ posts
Boolean variables :D
Semi-support, there's already an easy workaround:
But! It can be a good idea!
<(foo) = [bar]>
But! It can be a good idea!
<my variable :: variables>
<☁ my variable :: variables>
set [my variable v] to [true v]
- AceCoderClaws
-
Scratcher
51 posts
Boolean variables :D
I don't feel like a specifically boolean-type of variable is necessary. Why not just make it so you can put a variable into a conditional statement? If the value is a couple of specific binary values (true/false, 1/0, on/off, yes/no) would be treated as a boolean, otherwise it would just check for if the variable's value isn't empty like in other sorts of languages.
if (foo) then
say [True!]
end
if (foo) { console.log("True!"); }
- medians
-
Scratcher
1000+ posts
Boolean variables :D
WARNING!!!Yeah, it was intended as a mockup for this suggestion
this block is not real
- redspacecat
-
Scratcher
500+ posts
Boolean variables :D
I don't feel like a specifically boolean-type of variable is necessary. Why not just make it so you can put a variable into a conditional statement? If the value is a couple of specific binary values (true/false, 1/0, on/off, yes/no) would be treated as a boolean, otherwise it would just check for if the variable's value isn't empty like in other sorts of languages.I support this, it would be a huge timesaver. Right now onlyif (foo) then
say [True!]
endif (foo) { console.log("True!"); }
(item () of [list v] :: list)can go in boolean inputs and it would be nice if they all could. Booleans can already fit in round inputs, so why not the other way around?
(item # of [] in [list v])
- secretuch
-
Scratcher
100+ posts
Boolean variables :D
http://scratch.mit.edu/projects/10841526/The project doesn’t exist
Don’t advertise
- redspacecat
-
Scratcher
500+ posts
Boolean variables :D
That post was made 12 years ago, do you think the poster will still be active?http://scratch.mit.edu/projects/10841526/The project doesn’t exist
Don’t advertise
The project was made a really long time ago, it probably got unshared later.
Checking the project's thumbnail, it is, in fact related to boolean variables.
- rdococ
-
Scratcher
1000+ posts
Boolean variables :D
Any new feature must be weighed against the cognitive load it puts on newcomers trying the editor for the first time. At least, that's how the Scratch Team sees it, and it's why a lot of convenient but kind of unnecessary features like this don't make it in.
Last edited by rdococ (Aug. 20, 2025 19:44:53)
- lapisi
-
Scratcher
1000+ posts
Boolean variables :D
(#391)if they understand booleans and variables they'll be able to understand boolean variables
Any new feature must be weighed against the cognitive load it puts on newcomers trying the editor for the first time. At least, that's how the Scratch Team sees it, and it's why a lot of convenient but kind of unnecessary features like this don't make it in.
- secretuch
-
Scratcher
100+ posts
Boolean variables :D
Large type…(#391)if they understand booleans and variables they'll be able to understand boolean variables
Any new feature must be weighed against the cognitive load it puts on newcomers trying the editor for the first time. At least, that's how the Scratch Team sees it, and it's why a lot of convenient but kind of unnecessary features like this don't make it in.
Bread eggs, breaded eggs?
- AceCoderClaws
-
Scratcher
51 posts
Boolean variables :D
Use hacked blocks.The majority of users don't know how to do this. It would be a lot simpler for something like what I mentioned above to be implemented.
- lapisi
-
Scratcher
1000+ posts
Boolean variables :D
(#393)TV Tropes reference, can't link the actual TV Tropes article so I just typed the name into large-type.com, the short description of the trope is “'Thing A, Thing B, Thing A+B', though it can be longer.”Large type…(#391)if they understand booleans and variables they'll be able to understand boolean variables
Any new feature must be weighed against the cognitive load it puts on newcomers trying the editor for the first time. At least, that's how the Scratch Team sees it, and it's why a lot of convenient but kind of unnecessary features like this don't make it in.
Bread eggs, breaded eggs?
[/offtopic]
Last edited by lapisi (Aug. 21, 2025 19:49:20)
- medians
-
Scratcher
1000+ posts
Boolean variables :D
I feel like for the switch () block (not saying you made it), you could just do:
set [bool v] to <not <bool::variables>>
- Discussion Forums
- » Suggestions
-
» Boolean variables :D













