vbs的sort排序
程序员文章站
2022-07-04 17:18:47
function fsortarray(asortthisarray) dim oarraylist, ielement set o...
function fsortarray(asortthisarray)
dim oarraylist, ielement
set oarraylist = createobject( "system.collections.arraylist" )
for ielement = 0 to ubound(asortthisarray)
oarraylist.add asortthisarray(ielement)
next
oarraylist.sort
set fsortarray = oarraylist
end function
myarray=array(50,20,30)
msgbox myarray(0)
msgbox fsortarray(myarray)(0)
'createobject( "system.collections.arraylist" )调用了mscoree.dll,是.net framework相关组件。
dim oarraylist, ielement
set oarraylist = createobject( "system.collections.arraylist" )
for ielement = 0 to ubound(asortthisarray)
oarraylist.add asortthisarray(ielement)
next
oarraylist.sort
set fsortarray = oarraylist
end function
myarray=array(50,20,30)
msgbox myarray(0)
msgbox fsortarray(myarray)(0)
'createobject( "system.collections.arraylist" )调用了mscoree.dll,是.net framework相关组件。
上一篇: asp.net repeater实现批量删除第1/2页
下一篇: 查看进程使用的端口的批处理文件