On Jul 8, 2006, at 10:01 AM, Stephen Dodd wrote:
Does anyone know a reasonable method to shuffle paired data?
Create an array of integers with the same number of elements as the
arrays you want to shuffle. Assign to each array element its own
index value. Shuffle this array, then use SortWith to sort it while
rearranging the other arrays. Something like this:
For instance if I have 2 arrays:
dim Name(100) as string
dim Email(100) as string
Dim index(100) As Integer
For ctr As Integer = 0 To Ubound(index)
index(ctr) = ctr
Next ctr
index.Shuffle
index.SortWith Name, Email
Mars Saxman
REAL Software
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>