Skip to content

Quad names

Overview

There is a vendor-agnostic article about quad-names on the APL Wiki. This page is an overview focusing on application development with Dyalog.

See the Dyalog online documentation for:

System variables

The Dyalog online documentation has a complete list of system variables.

System variables describe the state of the system.
Some variables are static and cannot change.
Some variables are dynamic and can change without direct user intervention.
The others can be changed by the user.

⎕A ⎕DM ⎕DMX ⎕PATH ⎕SM
⎕TRAP ⎕AN ⎕EN ⎕PP ⎕STACK
⎕TS ⎕AV ⎕FR ⎕PW ⎕TC
⎕USING ⎕AVU ⎕IO ⎕RL ⎕THIS
⎕WA ⎕CT ⎕LC ⎕RSI ⎕TID
⎕WSID ⎕D ⎕LX ⎕RTL ⎕TNAME
⎕WX ⎕DCT ⎕ML ⎕SE ⎕TNUMS
⎕XSI ⎕DIV ⎕NULL ⎕SI ⎕TPOOL

Of course, the majority of the time you can refer to the help system to remind yourself exactly how each of these works. There are many system variables built up over the decades, many of which are kept mostly for backwards compatibility.

In the following table, the system variables you are most likely to come across in existing code are highlighted in red.

⎕A ⎕DM ⎕DMX ⎕PATH ⎕SM
⎕TRAP ⎕AN ⎕EN ⎕PP ⎕STACK
⎕TS ⎕AV ⎕FR ⎕PW ⎕TC
⎕USING ⎕AVU ⎕IO ⎕RL ⎕THIS
⎕WA ⎕CT ⎕LC ⎕RSI ⎕TID
⎕WSID ⎕D ⎕LX ⎕RTL ⎕TNAME
⎕WX ⎕DCT ⎕ML ⎕SE ⎕TNUMS
⎕XSI ⎕DIV ⎕NULL ⎕SI ⎕TPOOL

Constant

      ⎕A        ⍝ Upper-case alphabet
ABCDEFGHIJKLMNOPQRSTUVWXYZ
      ⎕D        ⍝ Digits 0-9
0123456789
      ⎕AN       ⍝ User's ID
dyalog
      ⎕NULL     ⍝ NULL constant
[Null]
      ⎕TC       ⍝ BackSpace, LineFeed, CarriageReturn 



      ⎕UCS⎕TC   ⍝ BackSpace, LineFeed, CarriageReturn 
8 10 13

Dynamic

⎕AV     ⍝ List of APL characters
⎕DM     ⍝ Last error message
⎕DMX    ⍝ ⎕DM+⎕EN in a thread safe form
⎕EN     ⍝ Last error number
⎕RTL    ⍝ Response time limit
⎕SE     ⍝ The session object
⎕TS     ⍝ Current date/time
⎕THIS   ⍝ Current object

Settable

⎕AVU   characters to use in ⎕AV
⎕CT    Comparison Tolerance
⎕DCT   Decimal Comparison Tolerance
⎕DIV   how to handle division by 0
⎕FR    float decimal system in use
⎕IO    index origin
⎕ML    Migration Level 
⎕LX    Latent eXpression
⎕PATH  where to find functions 
⎕RL    random number generation seed value

Division control

      ⎕DIV←0   ⍝ Default
      3÷0
DOMAIN ERROR: Divide by zero
      3÷0
       ∧
      0÷0
1
      ⎕DIV←1
      3÷0
0
      0÷0
0

The number of significant digits in the display of numeric output.

      ⎕PP←3
      ÷812
0.00123
≢'123'
3
      ⎕PP←17
      ÷812
0.0012315270935960591
≢'12315270935960591'
17

The Print Width ⎕PW sets the number of characters in the session before wrapping to a new line.

It can be assigned to directly, or set to automatically adjust based on the IDE windows size. In the Microsoft Windows IDE, go to OptionsConfigureSession and tick Auto PW. In the RIDE, go to EditPreferencesGeneralSession and tick Auto PW.

System functions

In this course, we try to introduce relevant quad-names in appropriate contexts. However, not every quad-name is shown in this tutorial.

A complete collection of categorised system functions is available from the Dyalog online documentation.

Further treatment of system functions is provided in Chapter L of Mastering Dyalog APL.