Thank you, Buzz! You're right.

We did try the mod function, but it failed on floats in D6.
Appearently this is fixed in D8. The project will be moved to director 8, soon.


D6.5:
-----
set f = 1144608783851.0

put f/2
-- 572304391925.5000 -- (big odd number)

put f mod 2
-- 0


D8:
---
f = 1144608783851.0

put f/2
-- 572304391925.5000 -- (same big odd number)

put f mod 2
-- 1

Yeah!


Thanks again,
Cole


>Did you try the mod function?  It can accept floats as well as integers.
>(it throws away the non-integer part & then evaluates)
>
>i.e.
>myFloat = 7.3
>put ilk(myFloat)
>- -- #float
>if (myFloat mod 2) then put "not even"
>- -- "not even"  -- ( 7 is an odd number )
>
>hth

[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!]

Reply via email to