I want to return a List from a Function in LotusScript.
eg.
Function myfunc() List As Variant
Dim mylist List As Variant
mylist("one") = 1
mylist("two") = "2"
myfunc = mylist
End Function
Dim mylist List As Variant
mylist = myfunc()
Is this possible?
If so, what is the correct syntax?
It seems you can't return a List from a Function.
You can easily wrap it in a class though and return the class.
eg.
Class WrappedList
Public list List As Variant
End Class
Function myfunc() As WrappedList
Dim mylist As New WrappedList
mylist.list("one") = 1
mylist.list("two") = "2"
Set myfunc = mylist
End Function
Answer was found here: LotusScript's List bug strikes again