Language Features: Difference between revisions
From NARS2000
Jump to navigationJump to search
Sudleyplace (talk | contribs) (→Syntax) |
Sudleyplace (talk | contribs) (→Syntax) |
||
Line 8: | Line 8: | ||
<!-- * [[Selective Assignment]]: e.g., <apll>(1 1⍉M)←0</apll> --> | <!-- * [[Selective Assignment]]: e.g., <apll>(1 1⍉M)←0</apll> --> | ||
* [[Sink]]: <apll>←R</apll> | * [[Sink]]: <apll>←R</apll> | ||
* [[Point Notation]]: '''Base''' — e.g., <apll>16b10FFFF</apll> as a shorthand for <apll>16{base}1 0 15 15 15 15</apll>; '''Pi''': — e.g., <apll>2p3</apll> as a shorthand for <apll>2π<sup>3</sup></apll> or <apll>2×(○1)*3</apll>; '''Euler''': e.g., <apll>2x3</apll> as a shorthand for <apll>2e<sup>3</sup></apll> or <apll>2×(*1)*3</apll>. | |||
==Primitive functions== | ==Primitive functions== |
Revision as of 01:12, 22 November 2008
At the moment, the following sections describe only those language features that are New or Enhanced relative to the Extended APL Standard, or that deserve special comment.
Syntax
- Strand Assignment: (A1 A2 ... An)←R
- Modify Assignment: Af←R
- Modify Strand Assignment: (A1 A2 ... An)f←R
- Function/Operator Assignment: A←f, A←op1, A←op2
- Sink: ←R
- Point Notation: Base — e.g., 16b10FFFF as a shorthand for 16⊥1 0 15 15 15 15; Pi: — e.g., 2p3 as a shorthand for 2π3 or 2×(○1)*3; Euler: e.g., 2x3 as a shorthand for 2e3 or 2×(*1)*3.
Primitive functions
- Index Generator: ⍳R
- Index Of: L⍳R
- Indexing: R[L], R[L]←A, R[L]f←A, L⌷R, L⊃R
- Matrix Inverse/Divide: ⌹R, L⌹R
- Without: L~R
Primitive operators
- Axis: f[X], f op1[X], f op2[X]g
- Composition: f∘g, f∘R, L∘g
- Null: f⊙
- Rank: f⍤X
- Rank with Axis: f⍥[X]
Datatypes
- Infinity: ∞ and ¯∞
- Arithmetic Progression Arrays: 2 3 4⍴⍳24
- Unicode Characters
- Array Predicates
System Functions
- ⎕AV (Atomic Vector)
- ⎕CR (Canonical Representation)
- ⎕DM (Diagnostic Message)
- ⎕DR (Data Representation)
- ⎕ERROR (Error Signal)
- ⎕MF (Monitor Function)
- ⎕NL (Name List)
- ⎕SIZE (Object Size)
- ⎕SYSID (System Identifier)
- ⎕SYSVER (System Version)
- ⎕TC/⎕TCxxx (Terminal Control)
- ⎕TF (Transfer Form)
- ⎕TYPE (Prototype)
- ⎕UCS (Universal Character Set)
System Variables
- Scalar System Variables (⎕CT, ⎕IO, ⎕PP, ⎕PW, ⎕RL)
- ⎕FC (Format Control)
- ⎕IC (Indeterminate Control)