The n-th element of a list l of size s
is addressed by l[n] where n is in [0..s−1] or [1..s].
The equivalent prefixed function is
at, which takes as argument a list and an integer n.
at returns the element of the list at index n.
Input :
or :
Output :
If l is a list of size s, l[n1..n2] returns the list
extracted from l containing the elements of indexes n1 to n2
where 0 ≤ n1≤ n2 < s (in Xcas syntax mode) or
0 < n1≤ n2 ≤ s in other syntax modes.
The equivalent prefixed function is
at with a list and an interval of integers (n1..n2)
as arguments.
See also : mid, section 5.38.3.
Input :
or :
Output :
Warning
at can not be used for sequences, index notation
must be used, as in (0,1,2,3,4,5)[2..3].