Discuss Scratch
- kNoobLauch
-
100+ posts
Boolean variables :D
Hey, often when I'm working with scratch I need variables which has only two conditions, true or false.
Would be cool if there were variable type.
(Sry 4 bad english… I need a signature
)
Would be cool if there were variable type.
(Sry 4 bad english… I need a signature

- jvvg
-
1000+ posts
Boolean variables :D
You can just set a variable to zero or one, and check if it equals one.
- dvd4
-
100+ posts
Boolean variables :D
You could also just set it to “true” or “false”.
if<(i)=>
}
*block here*
}
if<(i)=>
}
*block here*
}
- kNoobLauch
-
100+ posts
Boolean variables :D
Yes, I can… but boolean variables would be also nice ._.
- roijac
-
100+ posts
Boolean variables :D
indeed Yes, I can… but boolean variables would be also nice ._.

- zorket
-
500+ posts
Boolean variables :D
Lightnin already denied this because he said that it would confuse new scratchers.
- alexphan
-
1000+ posts
Boolean variables :D
One question: WHAT ARE BOOLEAN VARIABLES???????!?!?!?:o
- drmcw
-
1000+ posts
Boolean variables :D
WHAT ARE BOOLEAN VARIABLES???????!?!?!?:oOne question:
A variable that can be either true or false. If it was a Scratch block it would have pointy ends.
Last edited by drmcw (June 30, 2013 06:19:21)
- ProdigyZeta7
-
1000+ posts
Boolean variables :D
You know, you could always put boolean in a string argument.
i.e. set boolean to <(boolean) = {false}> (instant true/false switch!)
i.e. set boolean to <(boolean) = {false}> (instant true/false switch!)
- alexphan
-
1000+ posts
Boolean variables :D
WHAT ARE BOOLEAN VARIABLES???????!?!?!?:oOne question:
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?>
- JAVAProgramming
-
100+ posts
Boolean variables :D
I agree with jvvg.. It's really easy to set a variable to 1,0, true, or false. You can just set a variable to zero or one, and check if it equals one.
- TheScratchGuru
-
5 posts
Boolean variables :D
it would help however for organizing variables
- turkey3_test
-
1000+ posts
Boolean variables :D
Yeah, just do that, You know, you could always put boolean in a string argument.
i.e. set boolean to <(boolean) = {false}> (instant true/false switch!)
set [variable v] to <touching [sprite 1 v]?> //this actually works and sets the variable to true or false based on if it's touching or not
- vacuumfan7072
-
100+ posts
Boolean variables :D
foreverMy browser / operating system: Windows 7, Chrome 30.0.1599.101, Flash 11.9 (release 900)
set [Verify v] to <loud?>
set [Verify v] to <(var)=(var2)>
set [Verify v] to <Run ANY boolean here>
end
Last edited by vacuumfan7072 (Oct. 26, 2013 02:24:46)
- stevetheipad
-
500+ posts
Boolean variables :D
One of the goals of Scratch is to make it easy to use and simple to learn. Booleans are more complicated and are often used in large, complex code. Since the only people that would want booleans would be those who have more experience in programming, they would also know how to create booleans within the limitations of Scratch. This being so, it's not really a feature I'd like to see added, nor do I think the Scratch Team should spend time working on this type of featured at the moment.
- Cocles
-
24 posts
Boolean variables :D
One of the goals of Scratch is to make it easy to use and simple to learn. Booleans are more complicated and are often used in large, complex code. Since the only people that would want booleans would be those who have more experience in programming, they would also know how to create booleans within the limitations of Scratch. This being so, it's not really a feature I'd like to see added, nor do I think the Scratch Team should spend time working on this type of featured at the moment.
Yes. Booleans are complicated. Earlier programming languages were also complicated, and no recursion or OOP were implemented into. They were not user friendly, unstructured and strongly typed, among other characteristics. But they evolved into new programming concepts and easy of use. Prehistoric BASIC, ancient LOGO and Scratch nowadays show us that we can make an easy use of complex ideas. This being the case, I do not doubt that it is possible to implement Booleans, inheritance and much more features. I, as a user, would appreciate the efforts of users and Scratch Team and I think they can afford the time and expenses. I appreciate your comment.
- Diamond_Projects
-
100+ posts
Boolean variables :D
Don't forget:
set [ v] to [true v]And I support.
Last edited by Diamond_Projects (Sept. 17, 2014 13:11:28)