Array notation: Difference between revisions

Jump to navigation Jump to search
No change in size ,  11:30, 8 September 2022
m
no edit summary
(Restore intro and comparison)
mNo edit summary
Line 5: Line 5:
{{Built-ins|Array notation|(⋄)|[⋄]}} is a way to write most [[array]]s literally, with no or minimal use of [[primitive function]]s, possibly over multiple code lines. It differs from the [[strand notation]] existing since [[APL\360]] in that it can be used to write arrays of rank greater than one. Array notation is supported in [[dzaima/APL]], [[BQN]] (using angle brackets <code>⟨⋄⟩</code> instead of round parentheses <code>(⋄)</code>), and some tools for [[Dyalog APL]], where it is planned as an eventual language feature.
{{Built-ins|Array notation|(⋄)|[⋄]}} is a way to write most [[array]]s literally, with no or minimal use of [[primitive function]]s, possibly over multiple code lines. It differs from the [[strand notation]] existing since [[APL\360]] in that it can be used to write arrays of rank greater than one. Array notation is supported in [[dzaima/APL]], [[BQN]] (using angle brackets <code>⟨⋄⟩</code> instead of round parentheses <code>(⋄)</code>), and some tools for [[Dyalog APL]], where it is planned as an eventual language feature.


Array notation generally consists of a vector notation written with parentheses <source lang=apl inline>()</source>, roughly equivalent to stranding, and a high-rank notation using square brackets <source lang=apl inline>[]</source>, indicating the [[Mix]] of a vector. It also supports [[namespace]]s, using <source lang=apl inline>name:value</source> syntax in round parentheses. [[statement separator]]s must appear between elements and between [[wikipedia:name–value_pair|name–value pair]]s.
Array notation generally consists of a vector notation written with parentheses <source lang=apl inline>()</source>, roughly equivalent to stranding, and a high-rank notation using square brackets <source lang=apl inline>[]</source>, indicating the [[Mix]] of a vector. It also supports [[namespace]]s, using <source lang=apl inline>name:value</source> syntax in round parentheses. [[Statement separator]]s must appear between elements and between [[wikipedia:name–value_pair|name–value pair]]s.


== Examples ==
== Examples ==

Navigation menu