11.1 append()

With this function a new value can be appended to a collection (data types hash, list, matrix, refvec and vector) or a string once or several times.

In general, the data type of the (optional) new value has to be a scalar and match the value type of the collection.

The number of repetitions for the appending (Count parameter) has to be >= 0.

In case of an error, the function call is aborted with a fail.

Definition

anyalue append
(
      anyvalue ListValue  input,
      anyvalue NewValue   input
  { , integer  Count := 1 input }
  { , enum     Dir   := dir_row input }
)

Parameters

anyvalue ListValue input
This parameter specifies the collection or string where a value shall be appended.
anyvalue NewValue input
This parameter defines the new value to be added. The value must match the value type of the collection.
integer Count := 1 input
This optional parameter defines the number of times a new value (respectively how many rows or columns) shall be appended. Values >= 0 are allowed, with no appending being performed for 0. By default, the new value is appended once.
enum Dir := dir_row input
For collections of data type matrix, this optional parameter controls whether new rows (dir_row) or new columns (dir_column) are added.

Return value

The function returns the modified collection respectively the modified string.

Particularities

Examples

Availability

Since IDM version A.06.02.g

See also

Built-in function insert()