Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

addElement(list, value) Adds a value to the end of a list and returns the list.


Function: addElement()

Adds a value to the end of a list and returns the list.

Syntax

addElement(listvalue)

ArgumentTypeDescription
listAnyThe list to which value should be added. If this argument is a variable which evaluates to null then a new list will be returned containing only value. If this argument is not a list but a single value then a new list will be returned containing this argument and value.
valueAnyThe item that should be added to list

Examples

addElement($list, $value)

...

If in.rate is not found then an error message is added to a list of errors found so far. This is a useful way of building up a list of problems which are found as a stream is processed, which can then be formatted into a list of errors recorded on a Stream.

See Also