As sokol92 says, âun-curryingâ the index into the first parameter of the function signature is syntactic sugar provided by some languages, but not LO BASIC, as far as I know. It definitely is not a bug; itâs simply not a part of LO BASIC syntax. If a person wants to pass multiple values via the = assignment then theyâll probably want to assign the property to a containing class that holds all the values.
Hereâs the âfunctioningâ class:
Option Compatible
Option ClassModule
Option Explicit
'Module MyClass
Dim mValue As Variant
Private Sub class_initialize()
End Sub
Public Property Let Property1(Value As Variant)
mValue = Value
End Property
Public Property Get Property1()
Property1 = mValue
End Property
Hereâs the âcontainerâ class:
Option Compatible
Option ClassModule
Option Explicit
'Module MyContainer
Dim mThing1 As Variant
Dim mThing2 As Variant
Private Sub class_initialize()
End Sub
Public Property Let Thing1(Value As Variant)
mThing1 = Value
End Property
Public Property Get Thing1()
Thing1 = mThing1
End Property
Public Property Let Thing2(Value As Variant)
mThing2 = Value
End Property
Public Property Get Thing2()
Thing2 = mThing2
End Property
Here are a couple âconsumersâ:
Option Explicit
'Module MyConsumers
Public Sub TestThings()
Dim MyInstance As New MyClass
Dim Things As New MyContainer
Things.Thing1 = 1
Things.Thing2 = 2
MyInstance.Property1 = Things
MsgBox MyInstance.Property1.Thing1
End Sub
Public Sub TestNested()
Dim MyInstance As New MyClass
Dim MyOtherInstance As New MyClass
MyOtherInstance.Property1 = 99
MyInstance.Property1 = myOtherInstance
MsgBox MyInstance.Property1.Property1
End Sub
See the next comment about a bugâŚ