during the same execution, causing unnecessary repeated lookups.) Even the most sophisticated optimizing compiler would have an extremely hard time amalgamating two or more apparently disparate functions which might appear in different program sections or sub-routines, even though a programmer could do this easily, aggregating sums on the same pass over the array to minimize overhead). Ada The previous C code would become the following in the Ada language, which supports array-programming syntax. A := A + B; APL APL uses single character Unicode symbols with no syntactic sugar. A ← A + B This operation works on arrays of any rank (including rank 0), and on a scalar and an array. Dyalog APL extends the original language with augmented assignments: A +← B Analytica Analytica provides the same economy of expression as Ada. A := A + B; BASIC Dartmouth BASIC had MAT statements for matrix and array manipulation in its third edition (1966). DIM A(4),B(4),C(4) MAT A = 1 MAT B = 2 * A MAT C = A + B MAT PRINT A,B,C Mata Stata's matrix programming language Mata supports array programming. Below, we illustrate addition, multiplication, addition of a matrix and a scalar, element by element multiplication, subscripting, and one of Mata's many inverse matrix functions. . mata: : A = (1,2,3) \(4,5,6) : A 1 2 3 +-------------+ 1 | 1 2 3 | 2 | 4 5 6 | +-------------+ : B = (2..4) \(1..3) : B 1 2 3 +-------------+ 1 | 2 3 4 | 2 | 1 2 3 | +-------------+ : C = J(3,2,1) // A 3 by 2 matrix of ones : C 1 2 +---------+ 1 | 1 1 | 2 | 1 1 | 3 | 1 1 | +---------+ : D = A + B : D 1 2 3 +-------------+ 1 | 3 5 7 | 2 | 5 7 9 | +-------------+ : E = A*C : E 1 2 +-----------+ 1 | 6 6 | 2 | 15 15 | +-----------+ : F = A:*B : F 1 2 3 +----------------+ 1 | 2 6 12 | 2 | 4 10 18 | +----------------+ : G = E :+ 3 : G 1 2 +-----------+ 1 | 9 9 | 2 | 18 18 | +-----------+ : H = F[(2\1), (1, 2)] // Subscripting to get a submatrix of F and : //