¼ Index generator


One-argument form  See also two-argument form Index of

¼ generates a series of integers which start at the index origin (ŒIO) and whose length is specified by the right argument which must be 0 or a positive integer scalar. The examples below assume the default index origin of 1 (see ŒIO for more details). The argument to ¼ must be a simple numeric scalar or one-element vector.

             ŒIO                     (Default setting of ŒIO)
       1

To generate the series from 1 to 10:

             ¼ 10
       1 2 3 4 5 6 7 8 9 10

To generate the series 1 to 5 to be used in selecting the first five elements from a vector (see separate entry for [ ]):

             PRICE„29 4 61 5 88 2 18 90 3 201 12 53 27 80
             PRICE[¼ 5]
       29 4 61 5 88

To generate a vector of five elements containing the series 1, 1 2, and so on, use the ¨ ('each') operator.

             ¼¨¼5
        1  1 2  1 2 3  1 2 3 4  1 2 3 4 5

A common mechanism to generate an empty vector is:

             ¼0
                                     (No display)

Topic: APLX Help : Help on APL language : APL Primitives : ¼ Index list
[ Previous | Next | Contents | Index ]