APLX Help : Help on APL language : APL Primitives : ⍳ Index of
|
|
|
|
|
Two-argument form See also one-argument form Index generator
The result of dyadic 2 5 9 14 20 ⍳ 9
3 (9 is in position 3)
2 5 9 14 20 ⍳ 12 (12 isn't in the left argument, so a
6 number 1 greater than the number of
elements on the left results)
'GORSUCH' ⍳ 'S'
4 (S occurs in position 4)
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ⍳ 'CARP'
3 1 18 16 (The characters 'CARP' are in positions
3 1 18 and 16)
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ⍳ 'PORK PIE'
16 15 18 11 27 16 9 5 (The 27 in the result indicates
characters not found in the 26-character
left argument. In this case the 'space'
character.)
DAYS←'MON' 'TUES' 'WED'
⍴DAYS
3 (DAYS is a 3 element vector)
DAYS ⍳ 'MON' 'THURS' ('MON' found in first position, 'THURS'
1 4 is not found)
See |
|
APLX Help : Help on APL language : APL Primitives : ⍳ Index of
|
|
Copyright © 1996-2010 MicroAPL Ltd