RemoveAt Procedure

Creates a new List by removing one or more elements from an existing List.

Overload #1: RemoveAt(list, index)

Declaration
function RemoveAt(
list as List of T, index as Number
) as List of T

Parameters

Return value

List of T — A new List with the specified element removed.

Possible error codes

Example

Code
dim x = [1, 2, 3]
dim y = RemoveAt(x, 1)
print Len(y)
print y(0)
print y(1)
Output
2
1
3

Overload #2: RemoveAt(list, indices)

Declaration
function RemoveAt(
list as List of T, indices as List of Number
) as List of T

Parameters

Return value

List of T — A new List with the specified elements removed.

Possible error codes

Example

Code
dim x = [1, 2, 3]
dim y = RemoveAt(x, [0, 1])
print Len(y)
print y(0)
Output
1
3