Articles Archive
Director Forums
Director Wiki
Job Board
Search
 
 Director Online WikiMain Page | About | Help | FAQ | Special pages | Log in | Printable version | Disclaimers
Categories: Dictionary | Lingo

Append

From Director Online Wiki

append
Type: method
Version:  ?
Language: Lingo
Dependencies: none
Links/Related
setAt(), add()

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.

If you are working with unsorted lists, the append() method is faster than add().

If you use append() or setAt() on a sorted list, the list becomes unsorted and subsequent use of [[[add]]() will place the new values at the end of the list.

Table of contents

Syntax

from MX 2004 Documentation

linearList.append(value)

Verbose Syntax

append linearList, value

Examples

vList = [1, 2, 3]
vList.sort()    -- unnecessary: for unsort demonstration only
vList.append(5) -- will be placed at the end, and will unsort the list
vList.append(4) -- will be placed at the end
put vList
-- [1, 2, 3, 5, 4]

See also


Retrieved from "http://www.director-online.com/dougwiki/index.php/Append"

This page has been accessed 1562 times. This page was last modified 17:20, 7 Jul 2006.