AssignListElementNames (FPScript)

21.09.2021

Assigns element names to one or more elements in a list.

Syntax

AssignListElementNames(List, Names [ , Index ])

 

The syntax of the AssignListElementNames function consists of the following parts:

Part

Description

List

The list to which element names are to be assigned.

Permitted data structures are list. All data types are permitted.

Names

A string with a single element name, a data series with several element names, or a list from which the element names are to be taken.

Permitted data structures are scalar value, data series und list. Supported data types are string.

Index

The index of the elements in the list to which names are to be assigned. A scalar value addresses a single name and a data series addresses several names. Negative indexes index from the end of the list. The argument is optional. If you omit it, the element names passed as argument Names are assigned to the elements in the list in ascending order.

Permitted data structures are scalar value und data series. All integral data types are permitted.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Remarks

The elements in the list are numbered starting with zero. The result is the list with the assigned element names.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

AssignListElementNames(List, "Channel3", 2)

Assigns the name "Channel3" to the 3rd element of the list.

AssignListElementNames(List, {"Channel1", "Channel2", "Channel3"})

Assigns the names "Channel1", "Channel2", and "Channel3" to the first three items in the list.

AssignListElementNames(List, {"Channel1", "Channel5"}, {0, 4})

Assigns the names "Channel1" and "Channel5" to the first and fifth items in the list.

AssignListElementNames(List, List2)

Assigns the element names of the second list to the first list.

AssignListElementNames(List, List2, {0, 4})

Assigns the corresponding element names of the second list to the first and fifth elements of the first list.

See Also

ListElementNames Function

Data Structures

List Operator

List Element Operator

Share article or send as email:

You might be interested in these articles