4,493
edits
No edit summary |
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
:''This article describes a dyadic primitive function that performs indexing into an array. For the concept of array indices, see [[Index]]. For the concept of extracting items from an array, see [[Indexing]].'' | :''This article describes a dyadic primitive function that performs indexing into an array. For the concept of array indices, see [[Index]]. For the concept of extracting items from an array, see [[Indexing]].'' | ||
{{Built-in|Index|⌷}}, also called '''Squad Indexing''' after the name of the [[glyph]], is a [[dyadic]] [[primitive function]]. The result of <source lang=apl inline>X⌷Y</source> is an array formed with items of Y extracted by the [[index]] specification X. | {{Built-in|Index|⌷}}, also called '''Squad Indexing''' after the name of the [[glyph]], is a [[dyadic]] [[primitive function]]. The result of <source lang=apl inline>X⌷Y</source> is an array formed with items of Y extracted by the [[index]] specification X. Index is a proper [[function]] alternative to a mode of [[bracket indexing]] (which uses a dedicated syntax <source lang=apl inline>Y[X]</source>), making it usable within [[tacit programming]]. It shares its glyph with the monadic [[Materialise]] function. | ||
== Examples == | == Examples == | ||
Line 64: | Line 64: | ||
This form of indexing is supported in [[J]] as boxed left argument of '''From''' <source lang=j inline>{</source>. | This form of indexing is supported in [[J]] as boxed left argument of '''From''' <source lang=j inline>{</source>. | ||
== See also == | |||
* [[Pick]] | |||
* [[Select]] | |||
== External links == | == External links == | ||
=== Documentation === | === Documentation === | ||
* [ | * [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Index.htm Dyalog], [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Index%20with%20Axes.htm with axis] | ||
* [http://microapl.com/apl_help/ch_020_020_620.htm APLX] | * [http://microapl.com/apl_help/ch_020_020_620.htm APLX] | ||
* J [https://www.jsoftware.com/help/dictionary/d520.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/curlylf#dyadic Nuvoc] | * J [https://www.jsoftware.com/help/dictionary/d520.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/curlylf#dyadic Nuvoc] | ||
{{APL built-ins}}[[Category:Primitive functions]] | {{APL built-ins}}[[Category:Primitive functions]] |