Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0
Syntax
Code Block
languagenone
set anArray[ anIndex ] = <expression>
SemanticsThe operator [i] allows to set thei-th element of the array. The first element has the position 0. anIndex can be a static integer literal, an object type Integer or an action script language operation or expression returning an integer.
SubstitutablesanArrayCan be any variable or object attribute having the type Array.
anIndexCan be any expression that evaluates to an integer.
Info

It is not possible to use class operations as index function – only built-in action script language operations are allowed.

Examples

The examples below are based on the following class structure:

Object input is of type Container having a string array called myList and an array called myComplexList . The latter one holds elements of type ContainerElement , which in turn contain the integer attribute number.

Code Block
languagenone
set input.myList[index] = "changed";
set input.myComplexList[index].number = 4711;
Code Block
languagenone
set input.myList[input.myList.count()-1] = "changed";
set input.myComplexList[input.myComplexList.count()-1].number = 4711;
rp
Panel
titleRelated Pages: