procedure Insert(Value: <Type>; const Array: array of <Type>;
Index: Integer)
procedure Insert(const Value: array of <Type>; const Array: array of <Type>;
Index: Integer)
The Insert procedure inserts a new value (or array of values) into the Array input parameter. The Index input parameter specifies where the insertion will take place. The Value input parameter must be type-compatible with the Array input parameter that it is being inserted into.
This procedure cannot be used with strings in Elevate Web Builder. Strings are immutable in JavaScript, and therefore cannot be modified in-place using procedures such as this. For more information on these types, please see the Types topic.
Examples
X := [10,20,30,40];
Insert(35, X, 3); // X is [10,20,30,35,40] after the Insert call
X := [10,20,30,40];
Y := [21,22,23,24,25];
Insert(Y, X, 2); // X is [10,20,21,22,23,24,25,30,40] after the Insert call