This should give you the fractional part of a double:

  num = 123.456
  num = (ceil(num) - 1) - num

As for mod, maybe you could use something like this? (I've not tested this)

if num mod 1 then
    //fraction
else
    //integer
end if

hth,
Erick

On Jan 20, 2006, at 1:31 AM, Barrie Jones wrote:
The problem is that str(number) returns scientific notation for numbers greater than 6 digits. This means that I must test the number without using the str function. The example below (Num1 mod Num2) only works for integers. Since my numbers can be integer or decimal, I don't think the Mod operator can be used to test for a fractional part. Is there a function that returns only the fractional part of a number?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to