Array


 * This page is about the role of arrays in APL syntax. For a description of arrays as a data structure, see Array model.

In APL syntax, an array (or noun, in A Dictionary of APL and J) is a first-class entity in the language that can be passed as an argument to a function or an operand to an operator. The distinguishing feature of an array programming language is that all first-class values fit into the array model and thus can be called "arrays". Other language families might use the term "value" for such a concept, but in array programming "value" more commonly means anything that can be given a name (by assignment or function definition), which would also include functions and operators.

The term "array" might also refer to the subset of syntactic arrays that can be formed from characters, numbers, and enclosure. In a few languages, like J, these arrays are the only kind possible, but other languages might allow namespaces, objects, or functions to be placed inside arrays. The term total array ordering as used in Dyalog APL uses this more limited meaning. Arrays that fit this more limited definition have neater theoretical properties: they are immutable and can't form circular references (unlike namespaces), and it is easy to determine whether two different representations, perhaps with different internal types, refer to the same array (unlike functions, unless considered symbolically).