Re: QBasic --> Euphoria (again)
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Sep 01, 1998
- 591 views
On Tue, 1 Sep 1998, jiri babor wrote: > Ralf, you wrote: > > function abs (object x) > return x < 0 * -2 + x > end function > > Did you not really mean something like > > function abs(object x) > return -2*x*(x<0)+x -- or perhaps (1-2*(x<0))*x > end function I'll have to get in on this one :) function sgn(object x) return (x>0)-(x<0) -- or compare({x},{0}) end function function abs(object x) return x*sgn(x) end function -- Carl R White E-mail...: cyrek- at -bigfoot.com -- Remove the hyphens before mailing. Ta :) Url......: http://www.bigfoot.com/~cyrek/ In my last few days on the net, I have room for a witty quote. Irony. :S