Re: simple eurphoria question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mark K. Akita wrote:
> 
> Hi John,
> 
> This function seems to work as well for converting atom to integer.
> 
> }}}
<eucode>
> 
> function int(atom a)
> 
> 	return floor(a)+(a<0)
> 
> end function
> 
> </eucode>
{{{

> 
> Good luck!
> 
> Mark K. Akita
> <a href="http://marksarts.blogspot.com/">http://marksarts.blogspot.com/</a>

That's what I thought Mark, but it's incorrect. :)
Try with this set of numbers: 1, 1.1, 1.9, 2, -1, -1.1, -1.9, -2

Mike Nelson, or Larry Miller's solutions are correct.

Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu