Syntax
Public Function ArrayFill(ByRef FilledArray As Variant, ByVal Start As Integer, ByVal toIndex As Integer, ByVal value As Variant) As Boolean
Description
This functionis used to fill elements of an array from start index to an end index with a specific value.
Parameters
Key | Description |
FilledArray | Array that want to fill its elements, a value of type object |
Start | End position index, a value of type Integer. |
toIndex | End position index, a value of type Integer. |
value | Value that wants to fill the array with. Value of type object. |
Return value
Returnstrue if the array fills with elements otherwise returns false.
Sample
Public Sub main() Dim s(5) Dim res res = ArrayFill(s,2,5,8) AlertMessage s(2) End Sub
See Also