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

#1 2012-02-03 09:08:46

fabianorlando
New Scratcher
Registered: 2012-02-03
Posts: 4

How to assign floating numbers to the variables

I know how to set the variables values by using the "slider readout" object, but it permits to assign integer number only. How can I set floating numbers to the variables?

Thanks

Offline

 

#2 2012-02-03 09:11:49

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: How to assign floating numbers to the variables

Add a decimal point to the minimum or maximum.  smile

Offline

 

#3 2012-02-03 09:21:58

fabianorlando
New Scratcher
Registered: 2012-02-03
Posts: 4

Re: How to assign floating numbers to the variables

Thank you. I already set the variables with 0.0, but when I use the "slider readout" object to set the variables values, I can set integer numbers only

set (base) to 0.0
set (height) to 0.0
set (perimeter) to 0.0

Offline

 

#4 2012-02-03 16:07:27

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

Re: How to assign floating numbers to the variables

Right-click the variable, set the minimun and maximun to something with a fraction (for example, 6.1413) and then you're done.

Offline

 

#5 2012-02-03 16:54:56

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

Re: How to assign floating numbers to the variables

Try this:

set [base v] to (0.01)
set [height v] to (0.01)
set [perimeter v] to (0.01)


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

Offline

 

#6 2012-02-07 09:34:59

fabianorlando
New Scratcher
Registered: 2012-02-03
Posts: 4

Re: How to assign floating numbers to the variables

Thank you, I already done

Offline

 

Board footer