Another variant: trunc(n + (500 - (n mod 500)))
> Hi Hugh, > > function roundUp500 theNumber > return trunc(theNumber/500+1)*500 > end roundUp500 > > Seems to work. > > -- > Best regards, > > Mark Schonewille > > Economy-x-Talk Consulting and Software Engineering > Homepage: http://economy-x-talk.com > Twitter: http://twitter.com/xtalkprogrammer > KvK: 50277553 > > New: Download the Installer Maker Plugin 1.6 for LiveCode here > http://qery.us/ce > > On 3 mrt 2011, at 18:06, FlexibleLearning wrote: > >> Here's a poser for you all... >> >> How to round a number UP to the nearest 500? >> >> >> Hugh Senior >> FLCo > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode --- Brian Yennie QLD Learning (310)-367-7364 _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode