Re: Minimum & Maximum
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
|
Not Categorized, Please Help
|
|