OpenOffice basic:声明数组常量

OpenOffice basic: declaring an array constant

我知道这一定很愚蠢,但我确实在这个网站上搜索了很多东西,apache.org 并用谷歌搜索了很多,但我仍然无法做到

const indRangeNumbers(5) = {7,7,12,6,8}

错误:语法

global indRangeNumbers (5) = Array {7,7,12,6,8}

错误:,预期

甚至

global indRangeNumbers() as variant
sub assignArrays()
    indRangeNumbers = Array  {7,7,12,6,8}
end sub

分配给将包含单个 Array 对象的 Variant 变量,因此不需要 ()。

Global indRangeNumbers As Variant
Sub assignArrays()
    indRangeNumbers = Array(7,7,12,6,8)
End Sub

示例位于 https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=46161. Also see the DevGuide for how to initialize arrays at https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Basic/Mapping_of_Sequences_and_Arrays.