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

#1 2010-09-21 15:42:50

vncoffman
Scratcher
Registered: 2009-09-28
Posts: 1

Difference in behavior of < and > operators

I *think* this has not been reported - I did look.

I was just making a simple counting loop, with the loop control variable counting backward.

If I expressed the condition for the <repeat until>
as "number > variable,"  <(  <>>  )>  it worked correctly. 
If I expressed the exact same condition as "variable < number,"   <(  <<>  )>  I got an endless loop. 

It's down to -1698 as I type.....  ;->

Windows XP, Scratch 1.4.

Last edited by vncoffman (2010-09-21 15:44:07)

Offline

 

#2 2010-09-24 10:38:56

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: Difference in behavior of < and > operators

Are you sure the numbers are set right? If you want to duplicate the effects of the < block with the > one, use this:
<< <( variable <=> number )> <or> <( variable <>> number )> >>

Last edited by bigreader (2010-09-24 10:44:25)


I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#3 2010-09-24 10:42:10

Jwosty
Scratcher
Registered: 2009-12-19
Posts: 500+

Re: Difference in behavior of < and > operators

Hmm... Can you give us a picture of your script? It should work. That's odd...  hmm


http://i39.tinypic.com/18ert5.png Google it.  smile

Offline

 

Board footer