Description:
Get members at specified positions.
Syntax:
A.m(i) |
-n<=i<=n and i is not equal to 0; 1<=i<=n indicates getting the ith member; -n<=i<=-1 indicates getting the ith member from the bottom |
A.m(P) |
P is a non-zero n-integer sequence |
Note:
A is a sequence whose length is n, from which you get members at specified positions. The function is generally used to get members reversely from a sequence.
Parameters:
A |
A sequence expression |
i |
An integer |
P |
A non-zero n-integer sequence |
Options:
@r |
Turn back if the specified position exceeds the boundary of A, that is, to set i=if(i%n==0,n,i%n), where n is the length of A. |
@0 |
The member represented by a sequence number that exceeds the boundary of A will be excluded from the result. |
Return value:
A value or a sequence composed of the members at the specified positions in sequence A
Example:
|
A |
|
1 |
[a,b,c,d,e,f,g,h,i,j] |
|
2 |
=A1.m(2) |
b |
3 |
=A1.m(-2) |
i |
4 |
=A1.m([2,3]) |
[b,c] |
5 |
=A1.m([-2,-3]) |
[i,h] |
6 |
=A1.m@0([5,12]) |
[e] |
7 |
=A1.m@r([5,12]) |
[e,b] |
Related functions: