当前位置: 移动技术网 > IT编程>开发语言>.net > 数组数据排序的程序例子

数组数据排序的程序例子

2019年01月13日  | 移动技术网IT编程  | 我要评论

qq性格签名,做网站的公司,怀孕前一个月的征兆

数组数据排序的程序例子



<%
*** build example array to show that this thing can sort
*** alpha-numeric arrays
dim myarray
myarray = array(1,5,"shawn","says","hello"2m骺噃嶤123,12,98)
myarray = sort(myarray)
for i = 0 to ubound(myarray)
response.write myarray(i) & "<br>" & vbcrlf
next
response.end


*** sorter function that takes an array and sorts it
function sort(ary)
keepchecking = true
do until keepchecking = false
keepchecking = false
for i = 0 to ubound(ary)
if i = ubound(ary) then exit for
if ary(i) > ary(i+1) then
firstvalue = ary(i)
secondvalue = ary(i+1)
ary(i) = secondvalue
ary(i+1) = firstvalue
keepchecking = true
end if
next
loop
sort = ary
end function
%>  

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网