Array dimensions to ubound

' fills an array with the given value up to the given ubound
' IN: ub - The ubound of the array
' IN: val - The value to fill in
' OUT: Array: the new array
Function array_fill(ByVal ub, ByVal val)

Dim arr : ReDim arr(ub)
Dim i

For i = 0 To ub
arr(i) = val

array_fill = arr

End Function

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License