PrimaryListElement (FPScript)
Takes the primary element from a list.
Syntax
PrimaryListElement(DataSet)
The syntax of the PrimaryListElement function consists of the following parts:
Part |
Description |
---|---|
DataSet |
The data set from which the primary element is to be taken if the data set is a list. All data structures are allowed. All data types are permitted. |
Remarks
The primary list element is the first element in the list, i.e. the element with the index 0. If this is also a list, then the first element in this list is taken. The process is repeated until an element is found that is not a list. If DataSet is not a list, then this is returned unchanged.
Some lists contain primary data in the first element and secondary data in the other elements. A typical list could, for instance, contain the measured values of a sample in the first element and the standard error of these values in the second element. Use this function to program FPScript functions that can be called using lists as arguments without additional testing of the list type in the functions.
If an argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.
Available in
FlexPro View, Basic, Professional, Developer Suite
Examples
PrimaryListElement([1, 2]) |
Results in 1. |
PrimaryListElement([ [1, 2], 3]) |
Results in 1. |
PrimaryListElement(1) |
Results in 1. |
Arguments s |
Determines the increment of a signal. If the argument is passed as a list, then the first element in the list is used. |