Language Features: Difference between revisions
From NARS2000
Jump to navigationJump to search
Line 33: | Line 33: | ||
==System Functions== | ==System Functions== | ||
* [[System Function A|<apll>⎕A</apll>]] (Alphabet) | * [[System Function A|<apll>⎕A</apll>]] (Uppercase English Alphabet) | ||
* [[System Function AT|<apll>⎕AT</apll>]] (Attributes) | * [[System Function AT|<apll>⎕AT</apll>]] (Object Attributes) | ||
* [[System Function AV|<apll>⎕AV</apll>]] (Atomic Vector) | * [[System Function AV|<apll>⎕AV</apll>]] (Atomic Vector) | ||
* [[System Function CR|<apll>⎕CR</apll>]] (Canonical Representation) | * [[System Function CR|<apll>⎕CR</apll>]] (Canonical Representation) | ||
* [[System Function DM|<apll>⎕DM</apll>]] (Diagnostic Message) | * [[System Function DM|<apll>⎕DM</apll>]] (Diagnostic Message) | ||
* [[System Function DR|<apll>⎕DR</apll>]] (Data Representation) | * [[System Function DR|<apll>⎕DR</apll>]] (Data Representation) | ||
* [[System Function ERROR|<apll>⎕ERROR</apll>]] (Error | * [[System Function ERROR|<apll>⎕ERROR</apll>]] (Signal Error) | ||
* [[System Function FMT|<apll>⎕FMT</apll>]] (Format) | * [[System Function FMT|<apll>⎕FMT</apll>]] (Format) | ||
* [[System Function MF|<apll>⎕MF</apll>]] (Monitor | * [[System Function MF|<apll>⎕MF</apll>]] (Monitor Function) | ||
* [[System Function NC|<apll>⎕NC</apll>]] (Name Class) | * [[System Function NC|<apll>⎕NC</apll>]] (Name Class) | ||
* [[System Function NL|<apll>⎕NL</apll>]] (Name List) | * [[System Function NL|<apll>⎕NL</apll>]] (Name List) | ||
Line 49: | Line 49: | ||
* [[System Function TC|<apll>⎕TC</apll>/<apll>⎕TC</apll>xxx]] (Terminal Control) | * [[System Function TC|<apll>⎕TC</apll>/<apll>⎕TC</apll>xxx]] (Terminal Control) | ||
* [[System Function TF|<apll>⎕TF</apll>]] (Transfer Form) | * [[System Function TF|<apll>⎕TF</apll>]] (Transfer Form) | ||
* [[System Function TYPE|<apll>⎕TYPE</apll>]] (Prototype) | * [[System Function TYPE|<apll>⎕TYPE</apll>]] (Object Prototype) | ||
* [[System Function UCS|<apll>⎕UCS</apll>]] (Universal Character Set) | * [[System Function UCS|<apll>⎕UCS</apll>]] (Universal Character Set) | ||
* [[System Function VR|<apll>⎕VR</apll>]] (Visual Representation) | * [[System Function VR|<apll>⎕VR</apll>]] (Visual Representation) |
Revision as of 10:36, 24 August 2009
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 — 16b10FFFF as a shorthand for 16⊥1 0 15 15 15 15
- Pi — 2p3 as a shorthand for 2π3 or 2×(○1)*3
- Euler — 2x3 as a shorthand for 2e3 or 2×(*1)*3.
- Trains: e.g., avg←(+/ ÷ ⍴) applies the functions to its argument(s) in a particular way (in this case, to compute the average of a numeric vector).
- System Labels: ⎕PROTOTYPE and ⎕IDENTITY in user-defined functions/operators.
Primitive functions
- Index Generator: ⍳R
- Index Of: L⍳R
- Indexing: R[L], R[L]←A, R[L]f←A, L⌷R, L⍉R L⊃R
- Matrix Inverse/Divide: ⌹R, L⌹R
- Without: L~R
- Partitioned Enclose: 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] Y
Datatypes
- Infinity: ∞ and ¯∞
- Arithmetic Progression Arrays: 2 3 4⍴⍳24
- Unicode Characters
- Array Predicates
System Functions
- ⎕A (Uppercase English Alphabet)
- ⎕AT (Object Attributes)
- ⎕AV (Atomic Vector)
- ⎕CR (Canonical Representation)
- ⎕DM (Diagnostic Message)
- ⎕DR (Data Representation)
- ⎕ERROR (Signal Error)
- ⎕FMT (Format)
- ⎕MF (Monitor Function)
- ⎕NC (Name Class)
- ⎕NL (Name List)
- ⎕SIZE (Object Size)
- ⎕SYSID (System Identifier)
- ⎕SYSVER (System Version)
- ⎕TC/⎕TCxxx (Terminal Control)
- ⎕TF (Transfer Form)
- ⎕TYPE (Object Prototype)
- ⎕UCS (Universal Character Set)
- ⎕VR (Visual Representation)
- ⎕WA (Workspace Available)
System Variables
- Scalar System Variables (⎕CT, ⎕IO, ⎕PP, ⎕PW, ⎕RL)
- ⎕ELX (Error Trapping)
- ⎕FC (Format Control)
- ⎕IC (Indeterminate Control)