我想从LotusScript中的函数返回一个List.
例如.
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()
这可能吗?
如果是这样,那么正确的语法是什么?
您似乎无法从函数返回List.
您可以轻松地将它包装在一个类中,然后返回该类.
例如.
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
答案在这里找到:LotusScript的List bug再次出现