List Operator (FPScript)

23.08.2021

Combines any values into a list.

Syntax

[ [<ElementName1>] Expression1 [[, [<ElementName2>] Expression2], ...] ]

The syntax of the list operator consists of the following elements:

Element

Description

Expression1...n

Any expressions for which the results can be combined into a list.

ElementName1...n

An optional name for the list element.

Remarks

All data structures and data types are allowed for the elements in lists. Especially a list element can in turn be a list itself. Therefore, hierarchical data structures can be constructed as lists.

As an option, you can assign a name to each list element that you can then use to access the element.

The first element of a list is called the primary element and should contain the most important data. Most FPScript functions only process the primary element when a list is passed as an argument.

Notes:
If you want to create a list for which the first element is also a list, then for syntactical reasons you must make sure to insert at least one empty space between the two '[' characters; for instance, [ [1, 2], 3, 4] and not [[1, 2], 3, 4].
 
Use the List FPScript function when you want to determine the name of the list element at runtime, such as when taken from variables.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

[ SolutionVector, ConfidenceInterval ]

Combines the results of a regression stored in the variables SolutionVector and ConfidenceInterval for a list.

[ <Solution>SolutionVector, <Confidence>ConfidenceInterval ]

In this case, the list elements are called "Solution" and "Confidence".

 

See Also

Data Structures

List Element Operator

ListElementNames Function

List Function

PrimaryListElement Function

Share article or send as email:

You might be interested in these articles