1. abs() , rnd() func or integer cast?
		
		
Hi everyone, maybe I just missed it, but i can't find a lib function
 or builtin to isolate the integer part of a number. I need to just take
the integer part of a division result, but amazingly I can't find any way
of doing this in Euphoria. I searched the docs for either a integer divide 
such as DIV in pascal, or a lib function strip the decimal part off a number
so I can use it as an indice in a sequence!
		
	 
	
		
		2. Re: abs() , rnd() func or integer cast?
		
			- Posted by Bernie Ryan <xotron at blue?rog.co?>
			May 12, 2008
- 
				Last edited May 13, 2008			
Asa wrote:
> 
> 
>  Hi everyone, maybe I just missed it, but i can't find a lib function
>  or builtin to isolate the integer part of a number. I need to just take
> the integer part of a division result, but amazingly I can't find any way
> of doing this in Euphoria. I searched the docs for either a integer divide 
> such as DIV in pascal, or a lib function strip the decimal part off a number
> so I can use it as an indice in a sequence!
Look up ' floor '
Bernie
My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
		
	 
	
		
		3. Re: abs() , rnd() func or integer cast?
		
			- Posted by Asa <electro.legacy at gmai?.c?m>
			May 12, 2008
- 
				Last edited May 13, 2008			
Thanks for the quick reply! I guess the name thew me off. :)
		
	 
	
		
		4. Re: abs() , rnd() func or integer cast?
		
			- Posted by CChris <christian.cuvier at agricult??e.gouv.fr>
			May 12, 2008
- 
				Last edited May 13, 2008			
Asa wrote:
> 
> 
>  Hi everyone, maybe I just missed it, but i can't find a lib function
>  or builtin to isolate the integer part of a number. I need to just take
> the integer part of a division result, but amazingly I can't find any way
> of doing this in Euphoria. I searched the docs for either a integer divide 
> such as DIV in pascal, or a lib function strip the decimal part off a number
> so I can use it as an indice in a sequence!
1/ Check the manual for floor(), you'll be delighted.
2/ Sequence indexes are rounded down to integers if non integer atoms, so you
don't even need to call floor() in this case, the interpreter does it for you.
CChris