This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-12-24 19:58:29

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Boolean in variables?

I have been having weird things happening with variables accepting hexagonal blocks.
Ex:
<set{ test }to( <<  <and>  >>

Is anyone else having this? I have suspicions that it might be because of this: http://scratch.mit.edu/projects/Surfer123/344381 project experiment, but I can't be sure.

Last edited by shadow_7283 (2008-12-26 09:43:57)

Offline

 

#2 2008-12-25 10:39:02

J0j2
Scratcher
Registered: 2008-08-20
Posts: 1000+

Re: Boolean in variables?

WHAT? omg that works. omg, that makes no sense.


Happiness is a habit. You can help the world practice happiness a little more. Visit the 'Happiness List' below and post a list of 100 things that make you happy!
http://i.imgur.com/dMpk2.jpg?1?4499

Offline

 

#3 2008-12-25 14:26:12

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Boolean in variables?

Well, that's pretty cool...you can set a variable to a boolean value.  But you still can't use the variable as a boolean in a conditional so it's still not much help.   For instance, you can NOT do this yet:

[blocks]
<if> <{ Flag Variable }>
<end>
[/blocks]


Maybe in release 1.4 we'll get real boolean variables!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-12-26 09:49:04

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Boolean in variables?

Paddle2See wrote:

Well, that's pretty cool...you can set a variable to a boolean value.  But you still can't use the variable as a boolean in a conditional so it's still not much help.   For instance, you can NOT do this yet:

[blocks]
<if> <{ Flag Variable }>
<end>
[/blocks]


Maybe in release 1.4 we'll get real boolean variables!

OK I have looked into it further, and the glitch can be fun! I figured out that if you put  conditions in there that are true ( <set{ variable }to(  <( 0 <=>0  )> ) and it will read true on the display!

Last edited by shadow_7283 (2008-12-26 09:50:06)

Offline

 

Board footer