A Programming Language: Difference between revisions

Jump to navigation Jump to search
m
Ordering is written with theta, not 0
m (Categories)
m (Ordering is written with theta, not 0)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''''A Programming Language''''' is a book published in 1962 by [[Kenneth E. Iverson]] to describe one iteration of his [[Iverson notation]]. The book's title later was used to form the acronym APL. At the time of writing Iverson notation was used for mathematics and description of IBM's hardware, and its purely human purposes are reflected in the loose conventions (relative to APL) and two-dimensional structure of the notation presented in ''A Programming Language''.
'''''A Programming Language''''' is the title of a book and a paper, both published in 1962 by [[Kenneth E. Iverson]]. It describes one iteration of [[Iverson notation|his notation]]. The initials of the book's title later was used to form [[the name APL]]. At the time of writing Iverson notation was used for mathematics and description of IBM's hardware, and its purely human purposes are reflected in the loose conventions (relative to APL) and two-dimensional structure of the notation presented in ''A Programming Language''.


== Notation ==
== Notation ==


''A Programming Language'' does not feature a full multidimensional [[array model]]. Rather, operations are defined on [[scalar]]s, [[vector]]s, and [[Matrix|matrices]] and higher-[[rank]] arrays are not discussed. Nonetheless, it features many of the array conveniences that became characteristics of APL:
''A Programming Language'' does not feature a full multidimensional [[array model]]. Rather, operations are defined on [[scalar]]s, [[vector]]s, and [[Matrix|matrices]] while higher-[[rank]] arrays are not discussed. Nonetheless, it features many of the array conveniences that became characteristics of APL:
* [[Scalar functions]] are present with the name "basic operations".
* [[Scalar functions]] are present with the name "basic operations".
* While [[scalar extension]] is not defined in general, a scalar can be multiplied by an array as a "scalar multiple".
* While [[scalar extension]] is not defined in general, a scalar can be multiplied by an array as a "scalar multiple".
Line 20: Line 20:
* [[Index-Of]] is also written with <math>\iota</math> and an [[index origin]] subscript. It is defined on vector left arguments and vector or scalar right arguments.
* [[Index-Of]] is also written with <math>\iota</math> and an [[index origin]] subscript. It is defined on vector left arguments and vector or scalar right arguments.
* [[Membership]] is <math>\epsilon</math> as in APL.
* [[Membership]] is <math>\epsilon</math> as in APL.
* [[Reduction]] (<math>/</math>, or <math>//</math> instead of <source lang=apl inline>⌿</source>) starts from the left rather than the right. For reductions of [[empty]] arrays, the [[identity element]] is returned.
* [[Reduction]] (<math>/</math>, or <math>/\!/</math> instead of <syntaxhighlight lang=apl inline>⌿</syntaxhighlight>) starts from the left rather than the right. For reductions of [[empty]] arrays, the [[identity element]] is returned.
* [[Rotate]] is written with arrows: <math>\uparrow</math> for left rotation and <math>\downarrow</math> for right rotation.
* [[Rotate]] is written with arrows: <math>\uparrow</math> for left rotation and <math>\downarrow</math> for right rotation.
* [[Reverse]] is written with an arrow in some direction above the argument.
* [[Reverse]] is written with an arrow in some direction above the argument.
Line 27: Line 27:
* [[Catenate]] uses a circled comma.
* [[Catenate]] uses a circled comma.
* [[Indexing]] is written with a subscript, or <math>\textstyle\int_j</math> to allow [[index origin]] specification.
* [[Indexing]] is written with a subscript, or <math>\textstyle\int_j</math> to allow [[index origin]] specification.
* [[Grade]] is called "ordering", and the Grade of <math>x</math> with [[index origin]] <math>j</math> is written <math>0_j/x</math>
* [[Grade]] is called "ordering", and the Grade of <math>x</math> with [[index origin]] <math>j</math> is written <math>\theta_j/x</math>
* [[Base]] (<math>\bot</math>) on vectors works like in APL. On matrices, rows are paired up, or columns with a doubled base symbol.
* [[Base]] (<math>\bot</math>) on vectors works like in APL. On matrices, rows are paired up, or columns with a doubled base symbol.
* The [[Intersection]] and [[Union]] are written with <math>\cap</math> and <math>\cup</math>, and the [[Set Difference]] with <math>\Delta</math>.
* The [[Intersection]] and [[Union]] are written with <math>\cap</math> and <math>\cup</math>, and the [[Set Difference]] with <math>\Delta</math>.
* The [[Inner Product]] is written by placing one scalar function above another, e.g. <math>u\,^+_\times{}v</math>, and the [[Outer Product]] by using <math>\circ</math> in place of the top function with two vector arguments.
* The [[Inner Product]] is written by placing one scalar function above another, e.g. <math>u\,^+_\times{}v</math>, and the [[Outer Product]] by using <math>\circ</math> in place of the top function with two vector arguments
== External links ==
* [https://www.jsoftware.com/papers/AFIPS196205.htm Digitised version of the paper]
* [https://www.jsoftware.com/papers/APL.htm Partially digitised version of the book]
* [http://www.softwarepreservation.org/projects/apl/Books/APROGRAMMING%20LANGUAGE Scan of the full book]
{{APL dialects}}[[Category:Iverson notation]][[Category:Publications]]
{{APL dialects}}[[Category:Iverson notation]][[Category:Publications]]

Navigation menu