Skip to end of banner
Go to start of banner

arraySetElement

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Description

If elem is an element of the array type, returns a new array with the specified element on position index1. If index1 is greater than the array size, it will add empty elements on the missing positions.

Parameters

Return Type

Element of the array type

Example

watchers = setElement(watchers, 12, currentUser());

Sets the value currentUser for the 13 th element of the array watchers.

  1. If array is not defined as an array, the routine returns error.

  2. If index is not number the routine returns error.

Starting with version 2.5 we added the indexing operator. It will work on arrays, strings, dates and interval.
You can simply write in your programs watchers[12] = currentUser() to refer to the 13 th element in the watchers array.

See also

We've encountered an issue exporting this macro. Please try exporting this page again later.
  • No labels