您现在的位置是:网站首页> 编程资料编程资料
asp实现取得数组中的最大值的代码_应用技巧_
2023-05-25
191人已围观
简介 asp实现取得数组中的最大值的代码_应用技巧_
<%
'******************************
'函数:GetMax(str)
'参数:str,待处理的数字数组,以,分隔多了数字
'作者:阿里西西
'日期:2007/7/12
'描述:取得数组中的最大值
'示例:<%=GetMax("360,120,5,600,32")%>
'******************************
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&"
"
next
getmax=max
end function
%>
'******************************
'函数:GetMax(str)
'参数:str,待处理的数字数组,以,分隔多了数字
'作者:阿里西西
'日期:2007/7/12
'描述:取得数组中的最大值
'示例:<%=GetMax("360,120,5,600,32")%>
'******************************
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&"
"
next
getmax=max
end function
%>
相关内容
- asp下取得客户端IP地址函数 转换IP地址函数_应用技巧_
- asp下实现截取字符串特定部分内容函数_应用技巧_
- asp去除所有的超级链接的两种方法 替换与正则_应用技巧_
- asp快速开发方法之数据操作实例代码第1/3页_ASP基础_
- asp Chr 函数 数字转字母的方法_ASP基础_
- ReSaveRemoteFile函数之asp实现查找文件保存替换的代码_应用技巧_
- ReplaceSaveRemoteFile 替换、保存远程图片 的代码_应用技巧_
- DefiniteUrl asp将相对地址转换为绝对地址的代码_应用技巧_
- asp之GetArray提取链接地址,以$Array$分隔的代码_应用技巧_
- GetBody asp实现截取字符串的代码_应用技巧_
