Functions Index :: A :: ArrayFill
Module:
Definition:
ArrayFill(val base, int count, bool "strict")
Description:
Returns an array consisting of count copies of base (each copy can be independently manipulated).
If count == 0, a null string is returned.
The "strict" optional parameter when set to false makes the function to return a null (zero length) array when a negative count value is passed (the default behavior is to throw an error).
Examples:
a1 = ArrayFill(1, 5) # a1 == "1,1,1,1,1"
clp = AviSource(...)
a2 = ArrayFill(clp, 4)
# a2 now contains 4 copies of clp, each one independent of clp
a2 = a2.ArraySet(0, a2.ArrayGet(0).Tweak(hue=20))
a2 = a2.ArraySet(3, a2.ArrayGet(0).Tweak(cont=2))
# a2 1st and 4th elements are now different from the others
a3 = ArrayFill(2.35, 0) # a3 == "" (empty array)
# this will halt script with an error
a4 = ArrayFill("abc", -1)
# this will return a null array (same result as a3, above)
a5 = ArrayFill("abc", -1, false)