Contents in this wiki are for entertainment purposes only
This is not fiction ∞ this is psience of mind

Matrix: A Forest of Pointers

From Catcliffe Development
Jump to navigation Jump to search

Adventures of the late 1990s are on the way!

The sort method below is nothing about this page —it is written in VB6 —the granddad of Visual Studio —casualty of the Java wars, subsummed with misdirection of a half million coders into .Net. It was sad. VB 6.0 release was the brain child and pet project of Bill Gates.

Trivia: Xeno's licensed copy of VB6 came as a gift from Microsoft for partaking in their user-tests of the pre-release Excel Spreadsheet, late 90s, at a Microsoft campus in Washington State.

Private Sub ShellSort(arr() As Long)
    Dim gap As Long, i As Long, j As Long, temp As Long
    gap = UBound(arr) \ 2
    Do While gap > 0
        For i = gap To UBound(arr)
            temp = arr(i)
            j = i
            Do While j >= gap And arr(j - gap) > temp
                arr(j) = arr(j - gap)
                j = j - gap
            Loop
            arr(j) = temp
        Next i
        gap = gap \ 2
    Loop
End Sub