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
Next

array_fill = arr

End Function

Page tags: array library
page_revision: 1, last_edited: 1220439814|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License