Thomas, there is an explanation of anomalies with trunc() (and a solution) from Mark Waddingham here:

http://thread.gmane.org/gmane.comp.ide.revolution.user/67370/focus=67373

Best

Mark

On 9 Feb 2008, at 19:51, Thomas Bähler wrote:

Strange beahviour of the trunc function. This script:

on mouseUp
  put 8.1 into Zahl
  put Zahl - trunc(Zahl) into Dezimal
  put Dezimal*60 & comma & trunc(Dezimal*60)
end mouseUp

should return 6,6
but instead I get 6,5

If I change the first line to
  put 8.2 into Zahl

I get 12,11

with
  put 8.3 into Zahl
I get 18,18 as expected

RunRev 2.8.1 on Mac OSX 10.4.11

Any explanation?

Thanks Thomas

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to