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

#1 2012-03-03 07:19:08

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Squeak doesn't close when variable reaches infinity?

Accidentally, I managed to reach infinity via division by 0 in a new method. Usually, Squeak runs out of memory and closes. But this time, it didn't close!

With the vertical AND horizontal stretch blocks, I set VERTICAL STRETCH to 0 and HORIZONTAL STRETCH to 0 to. However, what happened, it uses factors of the other, using division to accomplish it. So HORIZ / VERTICAL = infinity. What is weird, the size setting WAS actually set to infinity! I thought it wouldn't...

PICTURES:

When you go on Looks when the Size is currently 76%, then the set size to block has a default value of 76. Likewise, if the Size is infinite, then the set size to block has a default value of infinity. This is giant proof, since it's not possible to place text in number fields. And look at it, the input kept it's round shape:
http://img196.imageshack.us/img196/5175/sizeinfinite.gif

Last edited by rdococ (2012-03-03 08:00:24)

Offline

 

#2 2012-03-03 07:53:33

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

Nice!  How come Scratch didn't freak out on memory?  Can you show us a picture of what the sprite now looks like?

Offline

 

#3 2012-03-03 07:58:44

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

The sprite didn't show when the size was set to infinity.

It's because after on, it had to divide by the error-producing calculation.

Dividing by infinity gives 0.

Offline

 

#4 2012-03-03 16:00:52

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

That's interesting... hmm


http://trinary.tk/images/signature_.php

Offline

 

#5 2012-03-04 00:04:58

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

Dividing by 0 is not infinity it is undefined.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#6 2012-03-04 12:33:09

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

BoltBait wrote:

Dividing by 0 is not infinity it is undefined.

Squeak thought it was infinity.

Offline

 

#7 2012-03-04 16:00:49

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Squeak doesn't close when variable reaches infinity?

rdococ wrote:

BoltBait wrote:

Dividing by 0 is not infinity it is undefined.

Squeak thought it was infinity.

Then, that's a bug.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer