Skip to content
Julius Paffrath edited this page Jun 24, 2026 · 8 revisions

Introduction

Lists are a very powerfull kind of variable and can store any type of data. Creating a list is easy:

store list() in myList

Creating a new list with elements is easy as well:

store list("Apple", "Orange", "Banana") in myFruits

If you add an element to a list, it will be appended at the end of the list:

store listAdd(myFruits, "Cherry") in myFruits

As you can see, all list functions are returning copies, so you have to store the result.

Complete reference

list(param1:any, param2:any, ...)

Returns a new list containing the given elements.

listAdd(list:list, element:any)

Adds the given element to the list.

listSet(list:list, index:number, element:any)

Sets an element at the given index.

listGet(list:list, index:number)

Returns the element at the given index.

listGetRange(list:list, rangeStart:number, rangeEnd:number)

Returns the elements in the given range.

listRemove(list:list, index:number)

Removes the element at the given index.

listReverse(list:list)

Reverses the elements in the list.

listExtend(list:list, expander:list)

Extends a list with another list.

Clone this wiki locally