Platforms to show: All Mac Windows Linux Cross-Platform

GetVariantTypeMBS(va as variant) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method XojoRuntime MBS Util Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries variant type.
Example
Var i As Int32 = 5
Var u As UInt32 = 5
Var vi As Variant = i
Var vu As Variant = u
Var ti As Integer = vi.Type // 2
Var tu As Integer = vu.Type // 2
Var mi As Integer = GetVariantTypeMBS(vi) // 2
Var mu As Integer = GetVariantTypeMBS(vu) // 102

Break // check in debugger

Same as variant.type or VarType() function, but returns 102 for UInt32 and 103 for UInt64.
This way plugin functions internally can distinguish between variants with unsigned vs. signed data types.

Some FAQ entries about this method:

Blog Entries

Xojo Developer Magazine

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


The biggest plugin in space...