ListFill Procedure
Creates a new list with
count elements, all set to
value.
Declaration
function ListFill(
value as T, count as Number
) as T
Parameters
- value as T — Any value.
- count as Number — The number of times to copy value into the constructed list.
Return value
A list containing
value repeated
count times.
Example
This example program constructs a list and then prints it.
Code
sub Main()
dim myList = ListFill("Hi!", 3)
print Len(myList)
for each element in myList
print element
next
end sub
Output