欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp取得數(shù)組中的最大值的方法

 更新時(shí)間:2007年11月14日 14:23:54   作者:  
如何取得數(shù)組中的最大值(由71port_80端口提供) 
 該函數(shù)的作用是取得一組數(shù)組中最大的一個(gè)值,非常實(shí)用且精典,值得收藏!
復(fù)制代碼 代碼如下:


snum="345,231,56,786,1100,356,1200,300,685,111,134,765"  

function GetMax(str) 
num=split(str,",") 
max=num(0) 
for ii=0 to ubound(num) 
if cint(num(ii))>cint(max) then max=num(ii) 
response.Write "num="&num(ii)&",max="&max&"<br />" 
next 
GetMax=max 
end function 

response.Write "數(shù)組"&snum&"<br />最大值:"&GetMax(snum) 

相關(guān)文章

最新評(píng)論