Skip to content

System Functions (by Category)

System Functions by Subject

The following tables list the system functions (a collective term for system constants, variables, functions, and operators) divided into appropriate categories by usage.

The dyadic operator ⎕OPT is unique in that it modifies the behaviour of other system functions (and function derived from system operators), effectively providing them with additional option arguments.

Session Information and Management

These provide information on, or control, the execution environment.

Name Description Form
⎕AI Account Information Constant
⎕AN Account Name Constant
⎕CLEAR Clear workspace (WS) Constant
⎕CY Copy objects into active WS Function
⎕LOAD Load a saved WS Function
⎕OFF End the session Constant
⎕SAVE Save the active WS Function

Workspace

These provide information on, and control, the current workspace and its contents.

Name Description Form
⎕EX Expunge objects Monadic function
⎕LX Latent Expression Variable
⎕NC Name Classification Monadic function
⎕NL Name List Monadic function
⎕SHADOW Shadow names Monadic function
⎕SIZE Size of objects Monadic function
⎕WA Workspace Available Constant
⎕WSID Workspace Identification Variable

Manipulating Workspace Contents

These are tools that allow you perform development environment actions under program control.

Name Description Form
⎕ED Edit one or more objects Ambivalent function
⎕EX Expunge objects Monadic function
⎕LOCK Lock a function Ambivalent function
⎕MONITOR Monitor set Dyadic function
⎕MONITOR Monitor query Monadic function
⎕OR Object Representation Monadic function
⎕PROFILE Profile Application Ambivalent function
⎕REFS Local References Ambivalent function
⎕STOP Set Stop vector Dyadic function
⎕STOP Query Stop vector Monadic function
⎕TRACE Set Trace vector Dyadic function
⎕TRACE Query Trace vector Monadic function

Namespaces and Objects

These are facilities to create, manipulate, and navigate namespaces and other objects, and for object oriented programming.

Name Description Form
⎕BASE Base Class Reference
⎕CLASS Class Monadic function
⎕CS Change Space Monadic function
⎕DF Display Format Monadic function
⎕FIX Fix Ambivalent function
⎕INSTANCES Instances Monadic function
⎕NEW New Instance Monadic function
⎕NS Namespace Ambivalent function
⎕THIS Self-reference Reference
⎕VGET Value Get Ambivalent function
⎕VSET Value Set Ambivalent function

Built-in Objects and Windows GUI

These are facilities for dealing with built-in objects. They mostly represent Microsoft Windows GUI elements, although a few other built-in objects are cross-platform and/or do not relate to the graphical interface.

Name Description Form
⎕DQ Await and process events Monadic function
⎕NQ Place an event on the Queue Ambivalent function
⎕WC Create GUI object Ambivalent function
⎕WG Get GUI object properties Ambivalent function
⎕WN Query GUI object Names Ambivalent function
⎕WS Set GUI object properties Ambivalent function
⎕WX Expose GUI property names Variable

Modifying Language Behaviour

Certain primitives and system functions have behaviour that is customised globally via a set of system variables. They are:

Name Description
⎕CT Comparison Tolerance
⎕DCT Decimal Comp Tolerance
⎕DIV Division Method
⎕FR Floating-Point Representation
⎕IO Index Origin
⎕ML Migration Level
⎕PP Print Precision
⎕RL Random Link

The following table describes the dependencies that exist between language elements and these system variables.

Table 1: Implicit Arguments
System Variable Monadic Functions Dyadic Functions Other
⎕CT, ⎕DCT ~ < = > | ⎕FMT
⎕DIV ÷ ÷  
⎕FR1 ÷ * ! + - × ÷ * | !  
⎕FR2 ~ < = >
⎕FR3 ⎕FX  
⎕IO ? ? ⎕FX @ []4 ⎕DMX5
⎕ML   ⎕TC
⎕PP ⎕FMT   ⎕← ⍞←
⎕RL ? ?  

1 functions that compute real numbers and whose precision depends on ⎕FR

2 functions that perform tolerant comparisons (intolerant if ⎕CT/⎕DCT is 0)

3 functions that perform intolerant comparisons (as if ⎕CT/⎕DCT was 0)

4 that is, bracket indexing and bracket axis

5 that is, some extended error messages take ⎕IO into account

Tolerant comparisons depend on ⎕FR to select which of ⎕CT and ⎕DCT is used. Even intolerant comparison depends on ⎕FR in the case of comparing DECFs: If two DECFs are different but correspond to the same double, then they will be treated as unequal when ⎕FR is 1287 but equal when it is 645.

System Constants

These constants simplify access to commonly-used values.

Name Description
⎕A Alphabetic uppercase characters (lowercase characters can be obtained with ⎕C⎕A)
⎕D Digits
⎕NULL Null Item

Data Conversion

These are tools to convert between common representations of data.

Name Description Form
⎕C Case Convert Ambivalent function
⎕CSV Comma Separated Values Ambivalent function
⎕DR Data Representation Monadic function
⎕DR Data Representation Dyadic function
⎕DT Datetime Dyadic function
⎕FMT Resolve display Monadic function
⎕FMT Format array Dyadic function
⎕JSON JSON Convert Ambivalent function
⎕TS Timestamp Constant
⎕UCS Unicode Convert Ambivalent function
⎕VFI Verify and Fix numeric Ambivalent function
⎕XML XML Convert Ambivalent function

Input and Output

These are communication facilities.

Name Description Form
Evaluated Input/Output Variable
Character Input/Output Variable
⎕ARBIN Arbitrary Input Dyadic function
⎕ARBOUT Arbitrary Output Dyadic function
⎕KL Key Labels Monadic function
⎕PFKEY Programmable Function Keys Ambivalent function
⎕RTL Response Time Limit Variable
⎕SD Screen Dimensions Constant
⎕SM Screen Map Variable
⎕SR Screen Read Ambivalent function

External Utilities

These are APL interfaces to various facilities outside Dyalog.

Name Description Form
⎕MAP Map a file Abivalent function
⎕NA Declare a DLL function Abivalent function
⎕R Replace Dyadic operator
⎕S Search Dyadic operator
⎕SHELL Execute a shell command or another program Monadic function
⎕USING Microsoft .NET Search Path Variable

Component Files

These create, control, and manipulate component files.

Name Description Form
⎕FAPPEND Append a component to File Dyadic function
⎕FAVAIL File system Availability Constant
⎕FCHK File Check and Repair Ambivalent function
⎕FCOPY Copy a File Dyadic function
⎕FCREATE Create a File Dyadic function
⎕FDROP Drop a block of components Dyadic function
⎕FERASE Erase a File Dyadic function
⎕FHIST File History Monadic function
⎕FHOLD File Hold Ambivalent function
⎕FLIB List File Library Monadic function
⎕FNAMES Names of tied Files Constant
⎕FNUMS Tie Numbers of tied Files Constant
⎕FPROPS File Properties Dyadic function
⎕FRDAC Read File Access matrix Monadic function
⎕FRDCI Read Component Information Monadic function
⎕FREAD Read a component from File Monadic function
⎕FRENAME Rename a File Dyadic function
⎕FREPLACE Replace a component on File Dyadic function
⎕FRESIZE File Resize Ambivalent function
⎕FSIZE File Size Monadic function
⎕FSTAC Set File Access matrix Dyadic function
⎕FSTIE Share-Tie a File Dyadic function
⎕FTIE Tie a File exclusively Dyadic function
⎕FUNTIE Untie Files Monadic function

Native Files

These create and manipulate files of any type as well as directories.

Name Description Form
⎕MKDIR Create a directory Ambivalent function
⎕NAPPEND Append to File Dyadic function
⎕NCOPY Copy files and directories Dyadic function
⎕NCREATE Create a File Dyadic function
⎕NDELETE Delete a File or Directory Ambivalent function
⎕NERASE Erase a File Dyadic function
⎕NEXISTS Discover whether or not a file or directory exists Monadic function
⎕NGET Read Text File Ambivalent function
⎕NINFO Query or set information about one or more files and/or directories Ambivalent function
⎕NLOCK Lock a region of a file Ambivalent function
⎕NMOVE Move files and directories Dyadic function
⎕NNAMES Names of tied Files Constant
⎕NNUMS Tie Numbers of tied Files Constant
⎕NPARTS Split a file name into its constituent parts. Ambivalent function
⎕NPUT Write Text File Dyadic function
⎕NREAD Read from File Monadic function
⎕NRENAME Rename a File Dyadic function
⎕NREPLACE Replace data on File Dyadic function
⎕NRESIZE File Resize Dyadic function
⎕NSIZE File Size Monadic function
⎕NTIE Tie a File exclusively Dyadic function
⎕NUNTIE Untie Files Monadic function

Threads

These are facilities to handle threads such as those created by Spawn (&).

Name Description Form
⎕TALLOC Allocate Token Range Abivalent function
⎕TCNUMS Thread Child Numbers Monadic function
⎕TID Current Thread Identity Constant
⎕TKILL Kill Threads Ambivalent function
⎕TNAME Current Thread Name Variable
⎕TNUMS Thread Numbers Constant
⎕TSYNC Wait for Threads to Terminate Monadic function

Synchronisation

These are facilities to ensure proper timing in the relationship between threads such as those created by Spawn (&).

Name Description Form
⎕DL Delay execution Function
⎕TALLOC Allocate Token Range Ambivalent function
⎕TGET Get Tokens Ambivalent function
⎕TPOOL Token Pool Monadic function
⎕TPUT Put Tokens Ambivalent function
⎕TREQ Token Requests Monadic function

Stack

These provide information about and manipulate the current call stack.

Name Description Form
⎕LC Line Count Constant
⎕NSI Namespace Indicator Constant
⎕RSI Space Indicator Constant
⎕SI State Indicator Constant
⎕SHADOW Shadow names Monadic function
⎕STACK Report Stack Constant
⎕STATE Return State of an object Monadic function
⎕XSI Extended State Indicator Constant

Error Handling

These are facilities to catch, cause, and investigate error events and interruptions.

Name Description Form
⎕DMX Extended Diagnostic Message Reference
⎕EM Event Messages Monadic function
⎕EXCEPTION Reports the most recent Microsoft .NET Exception Reference
⎕SIGNAL Signal event Ambivalent function
⎕TRAP Event Trap Variable

Shared Variables

These constitute the shared variable interface.

Name Description Form
⎕SVC Set access Control Dyadic function
⎕SVC Query access Control Monadic function
⎕SVO Shared Variable Offer Dyadic function
⎕SVO Query degree of coupling Monadic function
⎕SVQ Shared Variable Query Monadic function
⎕SVR Retract offer Monadic function
⎕SVS Query Shared Variable State Monadic function

Features for Classic

These are relevant only for the Classic (non-Unicode) edition and dealing with its data.

Name Description Form
⎕NXLATE Specify Translation Table Ambivalent function
⎕Ⓐ or ⎕Á Underscored Alphabetic Characters Constant
⎕AV Atomic Vector Constant
⎕AVU Atomic Vector - Unicode Variable

Archaic and Deprecated

These are deprecated facilities that are still supported for legacy purposes; Dyalog Ltd recommends using alternative approaches.

Name Description Form Alternative
⎕AT Object Attributes Ambivalent function ⎕ATX supports many more attributes
⎕CMD Execute the Windows Command Processor or another program Monadic function ⎕SHELL is interruptible, can separate output streams, and has lots of advanced options
⎕CMD Start a Windows Auxiliary Processor Dyadic function DLL/shared libraries via ⎕NA
⎕CR Canonical Representation Monadic function ⎕ATX can provide source as typed
⎕DM Diagnostic Message Constant ⎕DMX.DM is thread-safe
⎕EN Event Number Constant ⎕DMX.EN is thread-safe
⎕EXPORT Export objects Ambivalent function Use full (absolute or relative) namespace paths
⎕FX Fix definition Monadic function ⎕FIX saves source as typed
⎕NR Nested Representation Monadic function ⎕ATX can provide source as typed
⎕PATH Search Path Variable Use full (absolute or relative) namespace paths
⎕SH Execute a UNIX command or another program Monadic function ⎕SHELL is interruptible, can separate output streams, and has lots of advanced options
⎕SH Start a UNIX Auxiliary Processor Dyadic function DLL/shared libraries via ⎕NA
⎕SRC Source Monadic function ⎕ATX can provide source for non-objects
⎕TC Terminal Control Constant ⎕UCS 8, ⎕UCS 10, and ⎕UCS 13
⎕VR Vector Representation Monadic function ⎕ATX can provide source as typed
⎕XT Query External variable Monadic function ⎕MAP or component files
⎕XT Associate External variable Dyadic function ⎕MAP or component files

System Variables

System variables retain information used by the system in some way. Many system variables affect the behaviour of primitive functions and operators to which they act as implicit arguments.

System variables can be localised by inclusion in the header line of a defined function or in the argument list of the system function ⎕SHADOW. When a system variable is localised, it retains its previous value until it is assigned a new one. This feature is known as "pass-through localisation". The exception to this rule is ⎕TRAP.

A system variable can never be undefined. Default values are assigned to all system variables in a clear workspace.

⎕PATH and ⎕PW relate to the session. ⎕LX, ⎕SM, ⎕TRAP, and ⎕WSID relate to the active workspace, and all the other system variables relate to the current namespace:

Name Description Scope
⎕AVU Atomic Vector – Unicode Namespace
⎕CT Comparison Tolerance Namespace
⎕DCT Decimal Comparison Tolerance Namespace
⎕DIV Division Method Namespace
⎕FR Floating-Point Representation Namespace
⎕IO Index Origin Namespace
⎕LX Latent Expression Workspace
⎕ML Migration Level Namespace
⎕PATH Search Path Session
⎕PP Print Precision Namespace
⎕PW Print Width Session
⎕RL Random Link Namespace
⎕RTL Response Time Limit Namespace
⎕SM Screen Map Workspace
⎕TNAME Thread Name Workspace
⎕TRAP Event Trap Workspace
⎕USING Microsoft .NET Search Path Namespace
⎕WSID Workspace ID Workspace
⎕WX Window Expose Namespace

Note that the value assigned to a system variable must be appropriate, otherwise an error will be reported immediately.

Example

      ⎕IO3
DOMAIN ERROR
      ⎕IO3
      

Most system variables normalise their value structure:

      ⎕DIV0  ⍝ matrix in
1 1
      ⎕DIV     ⍝ scalar out

      ⎕LX'+'  ⍝ scalar in

      ⎕LX     ⍝ vector out
1
      ⎕TRAP0'C' '''Eh?'''  ⍝ depth 2 array in
¯2
      ⎕TRAP                 ⍝ depth 3 array out
¯3