Topic: APLX Help : Help on APL language : APL Primitives : ↑ First
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

First


One-argument form  See also two-argument form Take

First selects the first item of its argument. When the argument is an empty array, first returns the prototype of the array.

             ↑2 2⍴⍳4
       1
             A←('A.S.FREEMAN') 35 15000
             A
       A.S.FREEMAN 35 15000
             ⍴A
       3
             ↑A                      (First item of A is a text vector)
       A.S.FREEMAN
             ⍴↑A
       11
             TABLE←2 2⍴(2 2⍴⍳4) (⍳5) ('TEXT') ('EVEN MORE TEXT')
             TABLE                   (2 row, 2 column nested array)
        1 2   1 2 3 4 5
        3 4
       TEXT   EVEN MORE TEXT
             ↑TABLE                  (First item is a 2 by 2 numeric matrix)
       1 2
       3 4
             ⍴↑TABLE
       2 2

First can be used in selective specification.


Topic: APLX Help : Help on APL language : APL Primitives : ↑ First
[ Previous | Next | Contents | Index | APL Home ]