round and statRound

Mark Schonewille europe at ehug.info
Wed Apr 13 16:30:13 EDT 2005


Hi,

While we were talking this over on ChatRev, I came up with this 
one-line solution:

function f2 x
   return trunc(x)+(itemoffset((x is an integer),"true,false")-1)
end f2

(mind line-wraps).


If you want to join the discussion, download a client at

<http://home.wanadoo.nl/mark.sch/software/main.html>

Don't forget to enter the correct port number 8008.

Best,

Mark



Frank D. Engel, Jr. wrote:
> 
> Ack!  Mine is wrong too!
> 
> Mine is a round function for a language with no round function!

-- 

eHUG coordinator
mailto:europe at ehug.info
fax: +1 501 633 94 04
http://home.wanadoo.nl/mark.sch
http://www.ehug.info



More information about the use-livecode mailing list