SQL contains a number of aggregate functions that can do things like select the largest or smallest number from a set of values. This could be handy in the programming language itself.
ASP
function max(arrNumbers)
dim result
result = arrNumbers(0)
for each i in arrNumbers
if i > result then
result = i
end if
next
max = result
end function
function min(arrNumbers)
dim result
result = arrNumbers(0)
for each i in arrNumbers
if i < result then
result = i
end if
next
min = result
end function
No comments:
Post a Comment