Skip to main content

ListAdd

The ListAdd function allows to append one or more values to a list.

Prototype

    ListAdd(List; Value; ...)

Arguments

    List        Variable       By value  

Argument contains the variable of type list.

Value Any By value

Value or semicolon separated values to be added to the list. A variable number of parameters is accepted
to add more values. All Values must be of the same type as the list.

Returns

    Boolean

True if no errors occur.

Exception

    Undefined

Undefined is returned if one of the added values is not consistent with the type of the list.

Examples 

    ListAdd($$myList; 4; 5; 6)

This will add the three numeric values to the list $$myList.

    ListAdd($$myList; 4; 5; 'a')

This will raise an error since one of the three values is a string instead of a number.