I could not find a forum specifically for VBScripting. Can you use a Array.Sort method in VBScript or do you have to build a manual system for sorting? If so, where the heck would I start? Thanks in advance.
Ok althrough VBScript is not targeted language of this forum again it is a little bro of the vb as well of VB.NET
means to sort an array of values, nothing special needs to be done:
For example, say you have an array like this one:
VB.NET:
dim myArray
myArray = Array(3,1,8,2,4)
Then in order to sort this array you should do this:
VB.NET:
dim sort
set sort = new QSort
sort.Sort myArray
if you want to output the array you can do something like this:
VB.NET:
dim i
for i = 0 to UBound(myArray)
if (i > 0) then Response.Write ","
Response.Write myArray(i)
next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.