Adams Basic Package
>
Adams View
>
View Function Builder
>
Design-Time Functions
>
Functions: F - L
> FIRST_N
FIRST_N
Returns the first N elements of an array.
Format
FIRST_N (A,N)
Arguments
A
An array.
N
Number of elements to return.
Examples
The following examples illustrate the use of the FIRST_N function:
Function
FIRST_N ({ }, 3)
Result
{}
Function
FIRST_N ({1,2,3,4}, 2)
Result
{1,2}
Function
FIRST_N ({1,2,3,}, 4)
Result
{1,2,3}
Learn more about matrix/array functions
.
This site works best with JavaScript enabled