So, if you don't want the rounded number, subtract .5 from the float before
the mod function.

> I am afraid that I do not think so.
> 
> myFloat = 7.5
> put ilk(myFloat)
> - -- #float
> if not (myFloat mod 2) then put "even"
> - -- "even"
> 
> The mod function seems to round a float number before evaluation.
> _____
> Buzz Kettles wrote:
>> 
>> 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 )


[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