True Ken, but w/o comment it is much more difficult to know what is going on. If you're going to use one liners like this, you'd better add some commentary. One of the weaknesses I see in LC coding is the shortage of comments. I realize that is a strong-point of LC; it is "almost" self-commenting, but...
IMHO, Joe Wilkins On Feb 18, 2012, at 9:01 AM, Ken Ray wrote: >> function roundUp x >> return trunc(x) + char itemoffset((x mod 1 > 0),"true,false") of "10" >> end roundUp > > VERY clever, Peter! > > That's a great one-line variant to: > > function roundUp x > put trunc(x) into tRetVal > if x mod 1 > 0 then add 1 to tRetVal > return tRetVal > end roundUp > > :D > > Ken Ray > Sons of Thunder Software, Inc. > Email: k...@sonsothunder.com > Web Site: http://www.sonsothunder.com/ > > _______________________________________________ > 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 _______________________________________________ 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