Lingo Dictionary > A-C > append |  |

append

Syntax

    list.append(value)
    append list, value

Description

List command; for linear lists only, adds the specified value to the end of a linear list. This differs from the `add` command, which adds a value to a sorted list according to the list's order.

This command returns a script error when used with a property list.

Example

This statement adds the value 2 at the end of the sorted list named bids, which contains [1, 3, 4], even though this placement does not match the list's sorted order:

    set bids = [1, 3, 4]
    bids.append(2)

The resulting value of bids is [1, 3, 4, 2].

See also

`add`,`sort`