to me, it looks like the float might be being applied to the result of
dividing two integers.
try
(float(sprite(p_Sprite).height))/(sprite(p_Sprite).width)
notice the extra parenthesis around float...
--bhakti
Mahmood Akhtar wrote:
>
> Hi Lingo fellows!
>
> Here is another strange problem! The line of simple code is one, but the
> results are two? can any one guess that how?
>
> float(sprite(p_Sprite).height)/(sprite(p_Sprite).width)
>
> When I use it within a handler it gives the result 1.0000, whcih is not
> accurate, but when it is used in message window the result is 1.3261, which
> is accurate. Why? The p_sprite's width and height are different it is not a
> square, but rectangle and I want to reduce it proportionally.
>
> Thanx in advance.
>
> Mahmood.
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
R. Bhakti Klein
Multimedia Programmer, Distributed Learning Workshop
http://www.dlworkshop.net/
··
Baritone, Wicki6
http://www.wicki6.com
···
"On Earth, you can only do little things;
but you can do them with a lot of Love."
-- Mother Theresa
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]