Warning: session_start() [function.session-start]: open(/home/mybwtech/public_html/article/tmp/sess_134bef173c9c17964f06180482689b53, O_RDWR) failed: No such file or directory (2) in /home/mybwtech/public_html/article/global.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/mybwtech/public_html/article/global.php:3) in /home/mybwtech/public_html/article/global.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mybwtech/public_html/article/global.php:3) in /home/mybwtech/public_html/article/global.php on line 3
数组数据排序的程序例子 - 龙舞天翔资源共享
我的控制台 会员登陆 免费注册 最后更新 高级搜索 返回首页 我要投稿 退出登陆 龙舞论坛
当前在线: 0
 
站内搜索
Google
www.bwtech.net

德州扑克资料
投资透视
网站优化推广&SEO
网站设计
网络编程语言与开发
课件开发制作
网络文学
小资生活
数码摄影
财经-经营管理
其他杂项
龙舞天翔资源共享 / 网络编程语言与开发 / ASP语言技术 / 数组数据排序的程序例子
数组数据排序的程序例子
2005-06-01    dalu_ok (大鲁)    动网    点击: 1568
数组数据排序的程序例子

数组数据排序的程序例子

 

<%
''*** build example array to show that this thing can sort
''*** alpha-numeric arrays
Dim MyArray
MyArray = Array(1,5,"shawn","says","hello",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
%>

责任编辑: 龙舞天翔

相关文章
通过数组给您的文件排序 - 06-01 02:34 am - 点击: 1386

发表评论 查看评论 加入收藏 Email给朋友 打印本文
如果你想对该文章评分, 请先登陆, 如果你仍未注册,请点击注册链接注册成为本站会员.
平均得分 0, 共 0 人评分
1 2 3 4 5 6 7 8 9 10
Copyright © 2002 -2003 龙舞天翔资源共享
All rights reserved.
Powered by: phpArticle Version 2.0

Warning: Unknown: open(/home/mybwtech/public_html/article/tmp/sess_134bef173c9c17964f06180482689b53, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/mybwtech/public_html/article/tmp) in Unknown on line 0