dev.kanngard.net make sure you visit my new blog at: johankanngard.net

Comparator classes in LotusScript

by Johan Känngård / [LotusScript] / 2002-09-21 / #54


A Comparator can be used to compare different objects / variables, and is a perfect thing for sorting (explained in a future article). Can be used like this:

Dim i As Integer
Dim j As Integer
i = 10
j = 2
Dim comparator As New BasicComparator()
Print comparator.compare(i, j)

...which results in "1", because i is greater than j.



Floppy icon Comparator.ls0 Kb
Floppy icon BasicComparator.ls1 Kb
Floppy icon ReversedComparator.ls0 Kb