Platforms to show: All Mac Windows Linux Cross-Platform

The module SortMBS

module SortMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
module Sort MBS Util Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Useful sort methods for Xojo arrays.
Example
// fill two arrays
Dim test1() As String
Dim test2() As String

For i As Integer = 1 To 100000
test1.append Str(i)
test2.append Str(i)
Next

// now sort using Xojo and MBS
Dim m1 As Double = Microseconds
test1.Sort
Dim m2 As Double = Microseconds
sortArrayMBS test2
Dim m3 As Double = Microseconds

// check times
Dim d1 As Double = m2-m1
Dim d2 As Double = m3-m2

MessageBox d1.ToString+" in Xojo, "+d2.ToString+" in MBS"

Functions to sum up values in arrays, copying values or comparing values is much faster inside the plugin, than if you code this yourself in Xojo. Methods are available as method in SortMBS module as well as using extends on the Array directly.

Allows the usage of delegates for deciding how to sort yourself.

  • method AddArrayMBS(array1() as Boolean, array2() as Boolean)
  • method AddArrayMBS(array1() as Color, array2() as Color)
  • method AddArrayMBS(array1() as Currency, array2() as Currency)
  • method AddArrayMBS(array1() as Double, array2() as Double)
  • method AddArrayMBS(array1() as Int32, array2() as Int32)
  • method AddArrayMBS(array1() as Int64, array2() as Int64)
  • method AddArrayMBS(array1() as Object, array2() as Object)
  • method AddArrayMBS(array1() as Ptr, array2() as Ptr)
  • method AddArrayMBS(array1() as Single, array2() as Single)
  • method AddArrayMBS(array1() as String, array2() as String)
  • method AddArrayMBS(array1() as UInt32, array2() as UInt32)
  • method AddArrayMBS(array1() as UInt64, array2() as UInt64)
  • method AddMBS(extends array1() as Boolean, array2() as Boolean)
  • method AddMBS(extends array1() as Color, array2() as Color)
  • method AddMBS(extends array1() as Currency, array2() as Currency)
  • method AddMBS(extends array1() as Double, array2() as Double)
  • method AddMBS(extends array1() as Int32, array2() as Int32)
  • method AddMBS(extends array1() as Int64, array2() as Int64)
  • method AddMBS(extends array1() as Object, array2() as Object)
  • method AddMBS(extends array1() as Ptr, array2() as Ptr)
  • method AddMBS(extends array1() as Single, array2() as Single)
  • method AddMBS(extends array1() as String, array2() as String)
  • method AddMBS(extends array1() as UInt32, array2() as UInt32)
  • method AddMBS(extends array1() as UInt64, array2() as UInt64)
  • method CopyArrayMBS(source() as Boolean, dest() as Boolean, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Color, dest() as Color, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Currency, dest() as Currency, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Double, dest() as Double, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Int32, dest() as Int32, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Int64, dest() as Int64, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Object, dest() as Object, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Ptr, dest() as Ptr, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Single, dest() as Single, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as String, dest() as String, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as UInt32, dest() as UInt32, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as UInt64, dest() as UInt64, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyArrayMBS(source() as Variant, dest() as Variant, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Boolean, dest() as Boolean, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Color, dest() as Color, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Currency, dest() as Currency, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Double, dest() as Double, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Int32, dest() as Int32, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Int64, dest() as Int64, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Object, dest() as Object, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Ptr, dest() as Ptr, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Single, dest() as Single, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as String, dest() as String, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as UInt32, dest() as UInt32, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as UInt64, dest() as UInt64, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method CopyMBS(extends source() as Variant, dest() as Variant, sourceIndex as Integer = 0, sourceCount as Integer = -2, destIndex as Integer = 0)
  • method EqualsArrayMBS(array1() as Boolean, array2() as Boolean, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Color, array2() as Color, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Currency, array2() as Currency, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Double, array2() as Double, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Int32, array2() as Int32, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Int64, array2() as Int64, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Object, array2() as Object, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Ptr, array2() as Ptr, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as Single, array2() as Single, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as String, array2() as String, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as UInt32, array2() as UInt32, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsArrayMBS(array1() as UInt64, array2() as UInt64, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Boolean, array2() as Boolean, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Color, array2() as Color, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Currency, array2() as Currency, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Double, array2() as Double, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Int32, array2() as Int32, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Int64, array2() as Int64, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Object, array2() as Object, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Ptr, array2() as Ptr, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as Single, array2() as Single, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as String, array2() as String, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as UInt32, array2() as UInt32, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method EqualsMBS(extends array1() as UInt64, array2() as UInt64, array1offset as Integer = 0, count as Integer = -2, array2offset as Integer = 0) as Boolean
  • method SortArrayMBS(theArray() as Boolean, descending as boolean = false)
  • method SortArrayMBS(theArray() as Boolean, theDelegate as SortVariantDelegateBooleanMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Color, descending as boolean = false)
  • method SortArrayMBS(theArray() as Color, theDelegate as SortVariantDelegateColorMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Currency, descending as boolean = false)
  • method SortArrayMBS(theArray() as Currency, theDelegate as SortVariantDelegateCurrencyMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Date, descending as boolean = false)
  • method SortArrayMBS(theArray() as DateTime, descending as boolean = false)
  • method SortArrayMBS(theArray() as DateTime, theDelegate as SortVariantDelegateDateTimeMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Double, descending as boolean = false)
  • method SortArrayMBS(theArray() as Double, theDelegate as SortVariantDelegateDoubleMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Int32, descending as boolean = false)
  • method SortArrayMBS(theArray() as Int32, theDelegate as SortVariantDelegateInt32MBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Int64, descending as boolean = false)
  • method SortArrayMBS(theArray() as Int64, theDelegate as SortVariantDelegateInt64MBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Ptr, descending as boolean = false)
  • method SortArrayMBS(theArray() as Ptr, theDelegate as SortVariantDelegatePtrMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Single, descending as boolean = false)
  • method SortArrayMBS(theArray() as Single, theDelegate as SortVariantDelegateSingleMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as String, descending as boolean = false)
  • method SortArrayMBS(theArray() as String, theDelegate as SortVariantDelegateStringMBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as UInt32, descending as boolean = false)
  • method SortArrayMBS(theArray() as UInt32, theDelegate as SortVariantDelegateUInt32MBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as UInt64, descending as boolean = false)
  • method SortArrayMBS(theArray() as UInt64, theDelegate as SortVariantDelegateUInt64MBS, descending as boolean = false)
  • method SortArrayMBS(theArray() as Variant, theDelegate as SortVariantDelegateVariantMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Boolean, descending as boolean = false)
  • method SortMBS(extends theArray() as Boolean, theDelegate as SortVariantDelegateBooleanMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Color, descending as boolean = false)
  • method SortMBS(extends theArray() as Color, theDelegate as SortVariantDelegateColorMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Currency, descending as boolean = false)
  • method SortMBS(extends theArray() as Currency, theDelegate as SortVariantDelegateCurrencyMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Date, descending as boolean = false)
  • method SortMBS(extends theArray() as DateTime, descending as boolean = false)
  • method SortMBS(extends theArray() as DateTime, theDelegate as SortVariantDelegateDateTimeMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Double, descending as boolean = false)
  • method SortMBS(extends theArray() as Double, theDelegate as SortVariantDelegateDoubleMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Int32, descending as boolean = false)
  • method SortMBS(extends theArray() as Int32, theDelegate as SortVariantDelegateInt32MBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Int64, descending as boolean = false)
  • method SortMBS(extends theArray() as Int64, theDelegate as SortVariantDelegateInt64MBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Ptr, descending as boolean = false)
  • method SortMBS(extends theArray() as Ptr, theDelegate as SortVariantDelegatePtrMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Single, descending as boolean = false)
  • method SortMBS(extends theArray() as Single, theDelegate as SortVariantDelegateSingleMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as String, descending as boolean = false)
  • method SortMBS(extends theArray() as String, theDelegate as SortVariantDelegateStringMBS, descending as boolean = false)
  • method SortMBS(extends theArray() as UInt32, descending as boolean = false)
  • method SortMBS(extends theArray() as UInt32, theDelegate as SortVariantDelegateUInt32MBS, descending as boolean = false)
  • method SortMBS(extends theArray() as UInt64, descending as boolean = false)
  • method SortMBS(extends theArray() as UInt64, theDelegate as SortVariantDelegateUInt64MBS, descending as boolean = false)
  • method SortMBS(extends theArray() as Variant, theDelegate as SortVariantDelegateVariantMBS, descending as boolean = false)
  • method SumArrayMBS(source() as Boolean, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Int64
  • method SumArrayMBS(source() as Currency, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as Currency
  • method SumArrayMBS(source() as Double, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Double
  • method SumArrayMBS(source() as Int32, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Int64
  • method SumArrayMBS(source() as Int64, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as Int64
  • method SumArrayMBS(source() as Single, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Double
  • method SumArrayMBS(source() as UInt32, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as UInt64
  • method SumArrayMBS(source() as UInt64, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as UInt64
  • method SumMBS(extends source() as Boolean, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Int64
  • method SumMBS(extends source() as Currency, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as Currency
  • method SumMBS(extends source() as Double, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Double
  • method SumMBS(extends source() as Int32, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Int64
  • method SumMBS(extends source() as Int64, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as Int64
  • method SumMBS(extends source() as Single, sourceIndex as Integer = 0, sourceCount as Integer = -2) as Double
  • method SumMBS(extends source() as UInt32, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as UInt64
  • method SumMBS(extends source() as UInt64, sourceIndex as Integer = 0, sourceCount as Integer = -2, CheckOverflow as Boolean = false) as UInt64
  • delegate SortVariantDelegateBooleanMBS(v1 as Boolean, v2 as Boolean) as Integer
  • delegate SortVariantDelegateColorMBS(v1 as Color, v2 as Color) as Integer
  • delegate SortVariantDelegateCurrencyMBS(v1 as Currency, v2 as Currency) as Integer
  • delegate SortVariantDelegateDateTimeMBS(v1 as DateTime, v2 as DateTime) as Integer
  • delegate SortVariantDelegateDoubleMBS(v1 as Double, v2 as Double) as Integer
  • delegate SortVariantDelegateInt32MBS(v1 as Int32, v2 as Int32) as Integer
  • delegate SortVariantDelegateInt64MBS(v1 as Int64, v2 as Int64) as Integer
  • delegate SortVariantDelegatePtrMBS(v1 as Ptr, v2 as Ptr) as Integer
  • delegate SortVariantDelegateSingleMBS(v1 as Single, v2 as Single) as Integer
  • delegate SortVariantDelegateStringMBS(v1 as String, v2 as String) as Integer
  • delegate SortVariantDelegateUInt32MBS(v1 as UInt32, v2 as UInt32) as Integer
  • delegate SortVariantDelegateUInt64MBS(v1 as UInt64, v2 as UInt64) as Integer
  • delegate SortVariantDelegateVariantMBS(v1 as Variant, v2 as Variant) as Integer

Blog Entries

Release notes


The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...