Re: Missing abs() in Euphoria?
- Posted by Ray & Debbie Smith <smithr at IX.NET.AU> Jan 10, 2001
- 474 views
Hi Eddy, Yes, you are correct, there is no abs() function. There has been considerable discussion over this on the list in the past. The last mention I heard of it was at: &H=0&O=D&T=1&m=20974 and quoted the function: >The 'sequence-magic' abs() function is: > >function abs(object x) > -- The bit in the outer brackets is normally in the function "sgn()" > return x * ( (x>0)-(x<0) ) >end function Ray Smith ----- Original Message ----- From: Eddy Van Esch <raimundo4u at YAHOO.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Tuesday, January 09, 2001 8:34 PM Subject: Missing abs() in Euphoria? > Hi all, > Unless I overlooked it, it seems that Euphoria doesn't have a "abs()" > function to get the absolute value of a number... Of course it is very easy > to implement, but you should expect this to be a standard function in any > language.. > Kind regards > Eddy