Set outputLines = _ CreateObject("System.Collections.ArrayList") 'add lines outputLines.Add output outputLines.Add output outputLines.Sort() For Each outputLine in outputLines stdout.WriteLine outputLine Next
Set ArrayList = _ CreateObject("System.Collections.ArrayList") Randomize For i = 1 To 10 n = Int(100 * Rnd + 1) out = out n " " ArrayList.Add n Next WScript.Echo out WScript.Echo "=============================" ArrayList.Sort() out = "" For Each i In ArrayList out = out i " " Next WScript.Echo out