📜  从函数 vba 代码示例返回一个数组

📅  最后修改于: 2022-03-11 14:51:56.645000             🧑  作者: Mango

代码示例1
Function arrayOfPiDigits() As Long()

    'Add parenthesis after the data type
    Dim outputArray(0 To 2) As Long
    
    outputArray(0) = 3
    outputArray(1) = 1
    outputArray(2) = 4

    arrayOfPiDigits = outputArray
    
End Function