|
||||||
|
Relate Components | RelateScript | BlueStep.js |
Lists of Values: Arrays
Relate Script Arrays are lists of key/value pairs. This type of data is referred to in other languages as a map, dictionary, associative array or sparse array. Relate Script arrays can have multiple indexes (be multi-dimensional) and each index can be of any data type. A new array of String values indexed by Integer values would be created as: You can use Array values to model a mathematical set. For a set of String values you would do this: Array values work particularly well with for/in looping statements, which allow you to go through the entries in order by the index. There are also three functions available for Array values: size, firstIndex and lastIndex. These functions are described in the section on functions. Take note that this is not an object: all values must be of the same data type. More information and examples can be found on the page titled The Array Creation Statement. |