Re: Minimum & Maximum
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Sep 25, 1998
- 521 views
On Thu, 24 Sep 1998, Noah Smith wrote: > function minimum(object a, object b) > object c > > c = repeat(length(a), 0) > for i = 1 to length(a) do > if a[i] > b[i] then > c[i] = b[i] > else > c[i] = a[i] > end if > end for > return c > end function function minimum(object a, object b) return a * (a<b) + b * (b<a) end function function maximum(object a, object b) return a * (a>b) + b * (b>a) end function I'm at it again :) -- Carl R White E-mail...: cyrek- at -bigfoot.com -- Remove the hyphens before mailing. Ta :) Url......: http://www.bigfoot.com/~cyrek/ "Ykk rnyllaqur rgiokc cea nyemdok ymc giququezka caysgr." - B.Q.Vgesa