" />
asp实现取得数组中的最大值的代码
asp实现取得数组中的最大值的代码
发布时间:2016-12-29 来源:查字典编辑
摘要:cint(max)thenmax=num(ii)response.write"num="&num(ii)&",max="&max&""nex...

<%

'******************************

'函数:GetMax(str)

'参数:str,待处理的数字数组,以,分隔多了数字

'作者:阿里西西

'日期:2007/7/12

'描述:取得数组中的最大值

'示例:<%=GetMax("360,120,5,600,32")%>

'******************************

functionGetMax(str)

num=split(str,",")

max=num(0)

forii=0toubound(num)

ifcint(num(ii))>cint(max)thenmax=num(ii)

response.write"num="&num(ii)&",max="&max&"<br/>"

next

getmax=max

endfunction

%>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新ASP教程学习
热门ASP教程学习
编程开发子分类