List Functions

List functions are used to manage lists of parameters, pads ... They enable you to create lists, add items to the list, remove items from the list, retrieve values from the list, move elements of the list to another position, filter, and to copy the content of a list into another one. These functions are available in the Formula, the Rule and in the Action editors.

This page discusses:

+

Operator enabling you to add two lists and to return a third one. Adding two lists means concatenating the elements of the two lists and affecting the result to the returned list. The elements of the first list will be at the beginning of the resulting list. The order of the elements is kept. This operator works on list of objects (persistent or not) or on list of values (persistent or not). If the operation required is not feasible (for example, trying to fill a persistent list with a non persistent value), evaluation errors are raised. There is no simplification of the list (an element can be there twice after the operation).

Signature

+(List1: List, List2: List) : List

Arguments

NameInput / OutputRequired?TypeComment
List1InYesList-
List2InYesList-

ReturnType

List

Example

Let L1(List) 
						Let L2(List) 
						Let L3(List) 
						L3=L2+L1

Copy

Function used to copy the content of a list and paste it in another list.

Signature

Copy(List: List) : List

Arguments

NameInput / OutputRequired?TypeComment
ListInYesList-

ReturnType

List

List

Function used to create a list.

Signature

List([Next: ObjectType, ..]) : List

Arguments

NameInput / OutputRequired?TypeComment
NextInNoObjectType-

ReturnType

List

Example

let L1(List) 
						L1= List(Item1,Item2,Item3)

CreateMap

The CreateMap function creates a map used to store data in the form key-value pair. The map supports String, Real, Integer, and Feature types for keys and values. All of the aformentioned types can be used in any combination for key and value. For example, a Key can be of a Feature type whereas the value is the type of the Integer.

Signature

CreateMap(keytype : String, objtype : String) : Map

Arguments

Name Input/Output Required? Type Comment
mapObj Out Yes Map The created map.
iKeyType In Yes String Type of keys to be inserted.
iValueType In Yes String Type of values to be inserted.

ReturnType

Map

Create a New Map Object

// Creates a new Map Object
let mapObj1 (Map)
let mapObj2 (Map)
let mapObj3 (Map)
let mapObj4 (Map)
mapObj1 = CreateMap(“String”, “String”)
mapObj2 = CreateMap(“Integer”, “String”)
mapObj3 = CreateMap(“Feature”, “Integer”)
mapObj4 = CreateMap(“Real”, “Integer”)