>put integer(1.9 + 0.5)
>-- 2
>
>Regards,
>Pranav Negandhi

Unfortunately that would not work out:

put integer(1.0 + 0.5)
-- 2

The goal was to let 1.0 be 1.

Here's something that does work, but I feel sure there's something 
simpler (it can be simpler in two lines, but just for the fun of it 
I'm trying one line):

put n - (n - integer(n-.5)) + 1 * ((n - integer(n-.5))>0)

It may take a moment or two to see why it works.

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to