Home
Manual
Packages
Global Index
Keywords
Quick Reference

2.3.3 Nil index refers to an entire dimension
When you index a multidimensional array, very often you want to let
one or more dimensions be "spectators". In Yorick, you accomplish this
by leaving the corresponding index blank:
 x(3,)
x(,5:7)
y(,::1,)
x(,)

In these examples, x is a 2D array, and y is a 3D array.
The first example, x(3,), represents the 1D array of all the
elements of x with first index 3. The second represents a 2D
array of all of the elements of x whose second indices are 5, 6,
or 7. In the third example, y(,::1,) is the y array with
the elements in reverse order along its middle index. The fourth
expression, x(,), means the entire 2D array x, unchanged.
