SortMBS delegates

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to SortMBS module.

SortMBS.SortVariantDelegateInt64MBS(v1 as Int64, v2 as Int64) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
delegate Sort MBS Util Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The delegate to compare two Int64 values.
Example
Public Function CompareNumber(v1 as Integer, v2 as Integer) As integer
// we compare the absolute values, so 3 and -3 are next to each other in the result
v1 = Abs(v1)
v2 = Abs(v2)

If v1 = v2 Then
Return 0
ElseIf v1 < v2 Then
Return -1
Else
Return 1
End If
End Function

Sub Test
Dim testInteger() As Integer = Array(1,3,6,1,2,-3,0,9)
SortArrayMBS testInteger, AddressOf CompareNumber

Break // see in debugger
End Sub

Return 0 if equal, 1 if first value is bigger or -1 if first value is smaller.

Some methods using this delegate:

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


💬 Ask a question or report a problem