The programming language APL uses a number of symbols, rather than words from natural language, to identify operations, similarly to mathematical symbols. Prior to the wide adoption of Unicode, a number of special-purpose EBCDIC and non-EBCDIC code pages were used to represent the symbols required for writing APL.

Character sets

Tektronix 4013 computer display terminal with an APL keyboard, circa 1973

Due to its origins on IBM Selectric-based teleprinters, APL symbols have traditionally been represented on the wire[jargon] using a unique, non-standard character set. In the 1960s and 1970s, few terminal devices existed which could reproduce them, the most popular ones being the IBM 2741 and IBM 1050 fitted with a specific APL print head. Over time, with the universal use of high-quality graphic display, printing devices and Unicode support, the APL character font problem has largely been eliminated.

Character repertoire

IBM assigns the following character IDs (GCGIDs) to APL syntax, which are used in the definitions of its code pages.

"SL" (APL functional symbol) series GCGIDs
GCGIDIBM nameUnicodeNotes and other mappings
SL010000Up Stile (APL)U+2308⌈ LEFT CEILING
SL020000Down Stile (APL)U+230A⌊ LEFT FLOOR
SL030000Del (APL)U+2207∇ NABLA
SL040000Del Tilde (APL)U+236B⍫ APL FUNCTIONAL SYMBOL DEL TILDE
SL050000Del Stile (APL)U+2352⍒ APL FUNCTIONAL SYMBOL DEL STILE
SL060000Delta (APL)U+2206∆ INCREMENT
SL070000Delta Stile (APL)U+234B⍋ APL FUNCTIONAL SYMBOL DELTA STILE
SL080000Circle (APL)U+25CB○ WHITE CIRCLEThis is SM750000 in a non-APL context, for example, in the C0 replacement graphics from code page 437, which code pages 907, 909 and 910 inherit some or all of, retaining SM750000 in the C0 area and also including SL080000 outside of it. Both map to U+25CB when APL is represented using Unicode characters, although SL080000 can be mapped to U+F890 in IBM's private use area scheme. Compare SL590000 through SL620000 below.
SL090000Circle Stile (APL)U+233D⌽ APL FUNCTIONAL SYMBOL CIRCLE STILE
SL100000Circle Slope (APL)U+2349⍉ APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH
SL110000Circle Star (APL)U+235F⍟ APL FUNCTIONAL SYMBOL CIRCLE STAR
SL120000Circle BarU+2296⊖ CIRCLED MINUS
SL130000Quad Quote (APL)U+235E⍞ APL FUNCTIONAL SYMBOL QUOTE QUAD
SL140000Quad Divide (APL)U+2339⌹ APL FUNCTIONAL SYMBOL QUAD DIVIDE
SL150000Slash Bar (APL)U+233F⌿ APL FUNCTIONAL SYMBOL SLASH BAR
SL160000Slope Bar (APL)U+2340⍀ APL FUNCTIONAL SYMBOL BACKSLASH BAR
SL170000Up Caret Tilde (APL)U+2372⍲ APL FUNCTIONAL SYMBOL UP CARET TILDE
SL180000Down Caret Tilde (APL)U+2371⍱ APL FUNCTIONAL SYMBOL DOWN CARET TILDE
SL190000Down Tack Jot (APL)U+234E⍎ APL FUNCTIONAL SYMBOL DOWN TACK JOT
SL200000Up Tack Jot (APL)U+2355⍕ APL FUNCTIONAL SYMBOL UP TACK JOT
SL210000Up Shoe Null (APL)U+235D⍝ APL FUNCTIONAL SYMBOL UP SHOE JOT
SL220000Up Tack (APL)U+22A4⊤ DOWN TACK
SL230000Down Tack (APL)U+22A5⊥ UP TACK
SL240000Down Tack Up Tack (APL)U+2336⌶ APL FUNCTIONAL SYMBOL I-BEAM
SL250000Jot (APL)U+2218∘ RING OPERATOR
SL260000Left Bracket Right Bracket (APL)U+2337⌷ APL FUNCTIONAL SYMBOL SQUISH QUAD
SL270000Quad Jot (APL)U+233B⌻ APL FUNCTIONAL SYMBOL QUAD JOT
SL280000Quad Slope (APL)U+2342⍂ APL FUNCTIONAL SYMBOL QUAD BACKSLASH
SL290000Ampersand UnderbarNot used in any documented code page. Can be represented in Unicode with the sequence U+0026 U+0332 &̲
SL300000Equal Underbar (APL)U+2261≡ IDENTICAL TO
SL310000OUT Symbol (APL)noneNot used in any IBM-documented code page. IBM's reference glyph resembles oblique underlined forms of the letters O, U and T overstruck in the same character position.
SL320000Diaeresis Dot (APL)U+2235∵ BECAUSE
SL330000Delta Underbar (APL)U+2359⍙ APL FUNCTIONAL SYMBOL DELTA UNDERBAR
SL340000Left Tack (APL)U+22A2⊢ RIGHT TACK
SL350000Right Tack (APL)U+22A3⊣ LEFT TACK
SL360000Quad (APL)U+2395⎕ APL FUNCTIONAL SYMBOL QUADU+25AF▯ WHITE VERTICAL RECTANGLE
SL370000Less Greater (APL)U+22C4⋄ DIAMOND OPERATORU+25CA◊ LOZENGE, U+25C6◆ BLACK DIAMOND
SL380000Stile (APL)U+2223∣ DIVIDESU+2502│ BOX DRAWINGS LIGHT VERTICAL, U+007C| VERTICAL LINE
SL400000Up Shoe (APL)U+2229∩ INTERSECTIONU+22C2⋂ N-ARY INTERSECTION
SL410000Down Shoe (APL)U+222A∪ UNIONU+22C3⋃ N-ARY UNION
SL420000Left Shoe (APL)U+2282⊂ SUBSET OF
SL430000Right Shoe (APL)U+2283⊃ SUPERSET OF
SL440000Underbar (APL)U+005F_ LOW LINE
SL450000Diaeresis (APL)U+00A8¨ DIAERESIS
SL460000Tilde (APL)U+223C∼ TILDE OPERATORU+F88F in IBM's private use area scheme. Also mapped to U+007E~ TILDE, although SD190000 (U+007E in a non-APL context) co-occurs at 0xA1 (while SL460000 is at 0x80) in code page 213.
SL480000Circle PlusU+2295⊕ CIRCLED PLUS
SL490000Circle xU+2297⊗ CIRCLED TIMES
SL500000Down Caret (APL)U+2228∨ LOGICAL OR
SL510000Up Caret (APL)U+2227∧ LOGICAL ANDU+22C0⋀ N-ARY LOGICAL AND
SL520000Less (APL)U+003C< LESS-THAN SIGN
SL530000Greater (APL)U+003E> GREATER-THAN SIGN
SL540000Divide (APL)U+00F7÷ DIVISION SIGN
SL550000Times (APL)U+00D7× MULTIPLICATION SIGN
SL560000Not Greater (APL)U+2264≤ LESS-THAN OR EQUAL TO
SL570000Not Less (APL)U+2265≥ GREATER-THAN OR EQUAL TO
SL580000Quote Dot (APL)U+0021! EXCLAMATION MARKU+F88E in IBM's private use area scheme. SP020000 (U+0021! EXCLAMATION MARK in a non-APL context) co-occurs at 0x5A in code page 293 (SL580000 is at 0xDB in code pages 293 and 310). Tachyonsoft lists U+01C3ǃ LATIN LETTER RETROFLEX CLICK for SL580000.
SL590000Left Arrow (APL)U+2190← LEFTWARDS ARROWThese arrows are SM300000, SM310000, SM320000 and SM330000 respectively in a non-APL context, for example, in the C0 replacement graphics from code page 437, which code pages 907, 909 and 910 inherit some or all of. Their APL GCGIDs can be mapped to U+F88D, U+F88C, U+F88B and U+F88A respectively in IBM's private use area scheme. Code pages 907 and 910 keep the non-APL GCGIDs for the C0 replacements but use the APL GCGIDs where the arrows appear outside of the C0 area, while code page 909 uses the APL GCGIDs multiple times, both for the C0 replacements and for between one and two occurrences of each of these arrows outside of the C0 area.Compare SL080000 above. Duplicating C0 replacement graphics outside of the C0 area is not an uncommon practice in DOS code pages: compare, for example, the pilcrow and section sign in code page 850.
SL600000Right Arrow (APL)U+2192→ RIGHTWARDS ARROW
SL610000Up Arrow (APL)U+2191↑ UPWARDS ARROW
SL620000Down Arrow (APL)U+2193↓ DOWNWARDS ARROW
SL630000Overbar (APL)U+203E‾ OVERLINE
SL640000Slope (APL)U+005C\ REVERSE SOLIDUSU+F889 in IBM's private use area scheme. Also mapped to U+2216∖ SET MINUS. SM070000 (U+005C\ REVERSE SOLIDUS in a non-APL context) co-occurs at 0x5A (while SL640000 is at 0xB7) in code page 293.
SL650000Star (APL)U+22C6⋆ STAR OPERATORU+002A* ASTERISK
SL660000Quote (APL)U+0027' APOSTROPHE
SL670000Left Parenthesis (APL)U+0028( LEFT PARENTHESIS
SL680000Right Parenthesis (APL)U+0029) RIGHT PARENTHESIS
SL690000Bar (APL)U+002D- HYPHEN-MINUSU+2212− MINUS SIGN
SL700000Query (APL)U+003F? QUESTION MARKU+F888 in IBM's private use area scheme.
SL710000Alpha (APL)U+237A⍺ APL FUNCTIONAL SYMBOL ALPHAU+03B1α GREEK SMALL LETTER ALPHA
SL720000Epsilon (APL)U+220A∊ SMALL ELEMENT OFU+03B5ε GREEK SMALL LETTER EPSILON, U+2208∈ ELEMENT OF
SL730000Iota (APL)U+2373⍳ APL FUNCTIONAL SYMBOL IOTAU+03B9ι GREEK SMALL LETTER IOTA
SL740000Rho (APL)U+2374⍴ APL FUNCTIONAL SYMBOL RHOU+03C1ρ GREEK SMALL LETTER RHO
SL750000Omega (APL)U+2375⍵ APL FUNCTIONAL SYMBOL OMEGAU+03C9ω GREEK SMALL LETTER OMEGA
SL760000Slash (APL)U+002F/ SOLIDUS
SL770000Left Bracket (APL)U+005B[ LEFT SQUARE BRACKET
SL780000Right Bracket (APL)U+005D] RIGHT SQUARE BRACKET
SL790000Plus (APL)U+002B+ PLUS SIGN
SL800000Semicolon (APL)U+003B; SEMICOLON
SL810000Equal (APL)U+003D= EQUALS SIGN
SL820000Not Equal (APL)U+2260≠ NOT EQUAL TO
SL830000Colon (APL)U+003A: COLONForm with fullwidth attribute set (SL830080) is used for 0xA1C3 (i.e. U+2236∶ RATIO) in EUC-CN.
SL840000Dot (APL)U+002E. FULL STOP
SL850000Comma (APL)U+002C, COMMA
SL860000Iota Underbar (APL)U+2378⍸ APL FUNCTIONAL SYMBOL IOTA UNDERBAR
SL870000Epsilon Underbar (APL)U+2377⍷ APL FUNCTIONAL SYMBOL EPSILON UNDERBAR

EBCDIC code pages

Code page 293

Code page 293 (CCSID 293), called "APL (USA)", is an EBCDIC code page which includes APL symbols, in addition to preserving the basic Latin letters and Western Arabic numerals at their usual EBCDIC locations.

Code page 293
0123456789ABCDEF
0xNULSOHSTXETXSELHTRNLDELGESPSRPTVTFFCRSOSI
1xDLEDC1DC2DC3RES/ ENPNLBSPOCCANEMUBSCU1IFSIGSIRSIUS/ ITB
2xDSSOSFSWUSBYP/ INPLFETBESCSASFESM/ SWCSPMFAENQACKBEL
3xSYNIRPPTRNNBSEOTSBSITRFFCU3DC4NAKSUB
4xSP𝐴̲𝐵̲𝐶̲𝐷̲𝐸̲𝐹̲𝐺̲𝐻̲𝐼̲¢.<(+|
5x&𝐽̲𝐾̲𝐿̲𝑀̲𝑁̲𝑂̲𝑃̲𝑄̲𝑅̲!$⋆/*);¬
6x-/−/𝑆̲𝑇̲𝑈̲𝑉̲𝑊̲𝑋̲𝑌̲𝑍̲¦,%_>?
7x⋄/◊/◆∧/⋀¨`:/∶#@'="
8x∼/~abcdefghi
9xjklmnopqr
Ax~stuvwxyz∩/⋂∪/⋃[
Bx⍺/α∊/ε/∈⍳/ι⍴/ρ⍵/ω×\/∖÷]∣/│
Cx{ABCDEFGHI
Dx}JKLMNOPQR!/ǃ
Ex\STUVWXYZ
Fx0123456789EO

Code page 310

Code page 310 ("Graphic Escape APL/TN") includes a larger gamut of symbols, but does not itself include the basic Latin letters or the basic digits. It is used alongside Code page 37 (2), with the Code page 310 codes being prefixed by the Graphic Escape (EBCDIC 0x08) control character.

Code page 310 (prefixed with 0x08)
0123456789ABCDEF
0x
1x
2x
3x
4xSP𝐴̲𝐵̲𝐶̲𝐷̲𝐸̲𝐹̲𝐺̲𝐻̲𝐼̲
5x𝐽̲𝐾̲𝐿̲𝑀̲𝑁̲𝑂̲𝑃̲𝑄̲𝑅̲
6x𝑆̲𝑇̲𝑈̲𝑉̲𝑊̲𝑋̲𝑌̲𝑍̲
7x◊/⋄/◆∧/⋀¨
8x∼/~│/⎥
9x█/■⌑/¤±
Ax¯/‾°∙/•∩/⋂∪/⋃[
Bx⍺/α∊/∈/ε⍳/ι⍴/ρ⍵/ω×∖/\÷]∣/│
Cx{⁺/+■/∎§
Dx}⁻/-ǃ/!
Ex
Fx¹²³

Code page 351

Code page 351 ("GDDM Default (USA)") contains most of the characters of Code page 293 and Code page 310 (except , epsilon with underline) in addition to the letters and digits, by replacing several control characters with symbols.

Code page 351
0123456789ABCDEF
0xNUL{HTFFCR
1xNLBS
2x}LF§
3x¹²³
4xSP𝐴̲𝐵̲𝐶̲𝐷̲𝐸̲𝐹̲𝐺̲𝐻̲𝐼̲¢.<(+|
5x&𝐽̲𝐾̲𝐿̲𝑀̲𝑁̲𝑂̲𝑃̲𝑄̲𝑅̲!$*);¬
6x-/𝑆̲𝑇̲𝑈̲𝑉̲𝑊̲𝑋̲𝑌̲𝑍̲¦,%_>?
7x¨°`:#@'="
8xabcdefghi
9xjklmnopqr±
Ax¯~stuvwxyz[
Bx∈/∊×∖ / \÷]
Cx{ABCDEFGHI
Dx}JKLMNOPQRǃ/!
Ex\STUVWXYZ
Fx0123456789

7-bit modified ASCII

Code page 371 (IR-68)

Code page 371, registered for use with ISO/IEC 2022 as ISO-IR-68, is a 7-bit heavily modified ASCII, designed by the APL Working Group of the Canadian Standards Association, intended for use with APL in an environment allowing overstriking of characters using the BS (backspace, 0x08) control code.

8-bit modified and/or extended ASCII

Code page 907

Code page 907 is used by the IBM 3812, like code page 906.

Code page 907
0123456789ABCDEF
0x
1x§
2xSP!/ǃ"#$%&'()⋆/*+,-/−./
3x0123456789:/∶;<=>?
4x@ABCDEFGHIJKLMNO
5xPQRSTUVWXYZ[\/∖]∧/⋀_
6x`abcdefghijklmno
7xpqrstuvwxyz{∣/│}∼/~
8x𝐴̲𝐵̲𝐶̲𝐷̲𝐸̲𝐹̲𝐺̲𝐻̲𝐼̲𝐽̲𝐾̲𝐿̲𝑀̲𝑁̲𝑂̲𝑃̲
9x𝑄̲𝑅̲𝑆̲𝑇̲𝑈̲𝑉̲𝑊̲¢𝑋̲
Ax𝑌̲𝑍̲¬∪/⋃
Bx
Cx
Dx
Ex⍺/αß⍴/ρ⍳/ι∊/ε/∈∩/⋂
Fx×÷⍵/ω¨NBSP

Code page 909

Code page 909 is another encoding for APL, differing from code page 907 in not including the underlined characters, assigning different codes to the APL characters which fall in the 0xB0–DF range, and replacing some of the C0 replacement graphics from code page 437 with alternative encodings for certain APL symbols.

Code page 909
0123456789ABCDEF
0x
1x§
2xSP!/ǃ"#$%&'()⋆/*+,-/−./
3x0123456789:/∶;<=>?
4x@ABCDEFGHIJKLMNO
5xPQRSTUVWXYZ[\/∖]∧/⋀_
6x`abcdefghijklmno
7xpqrstuvwxyz{∣/│}∼/~
8xÇüéâäàåçêëèïîìÄÅ
9xôöòûùÖÜ£
AxáíóúñѪº¿¬∪/⋃¡
Bx
Cx
Dx⋄/◊/◆
Ex⍺/αß⍴/ρ⍳/ι∊/ε/∈∩/⋂
Fx×÷⍵/ω¨NBSP

Code page 910

Code page 910 is similar to code page 909, but with fewer duplicate horizontal arrows, using the same C0 graphics as code page 437, and including some additional characters.

Code page 910
0123456789ABCDEF
0x
1x§
2xSP!/ǃ"#$%&'()⋆/*+,-/−./
3x0123456789:/∶;<=>?
4x@ABCDEFGHIJKLMNO
5xPQRSTUVWXYZ[\/∖]∧/⋀_
6x`abcdefghijklmno
7xpqrstuvwxyz{∣/│}∼/~
8xÇüéâäàåçêëèïîìÄÅ
9xôöòûùÖÜø£
AxáíóúñѪº¿¬½∪/⋃¡
Bx
Cx
Dx⋄/◊/◆¦Ì
Ex⍺/αß⍴/ρ⍳/ι∊/ε/∈∩/⋂
Fx×÷⍵/ω¨NBSP

Unicode

Most APL symbols are present in Unicode, in the Miscellaneous Technical range, although some APL products may not yet feature Unicode, and some APL symbols may be unused or unavailable in a given vendor's implementation.

As of 2010, Unicode allows APL to be stored in text files, published in print and on the web, and shared through email and instant messaging. Entering APL characters still requires the use of either a specific input method editor or keyboard mapping, or of a specific touch interface. APL keyboard mappings are available for free for the most common operating systems, or can be obtained by adding the Unicode APL symbols to existing keyboard map.

Underscored alphabetic characters

Missing from Unicode are the traditional underscored alphabetic characters included in some of the APL code pages; their usage has been eliminated or deprecated in most APL implementations. These were produced on APL printing terminals by over-striking a straight capital letter with an underscore character. Some tables show them simulated with underlined and italic markup, not listing Unicode mappings.

IBM assigns them GCGIDs as "LA480000" (which they name "A Line Below Capital/A Underscore (APL)"), "LB480000" ("B Line Below Capital/B Underscore (APL)") and so forth, under the "L" series used for Latin letters. The use of an even number (48) rather than an odd number (47) is due to being uppercase: compare the use of SD110000 for a lone acute accent ´, LA110000 for the lowercase á, and LA120000 for the uppercase Á. They are included in IBM's private use area scheme, encoded in reverse‑alphabetical order in the odd-numbered code points from U+F8BF to U+F8F1.

Homologous uses of 47 include the "SD" (diacritic) series GCGID SD470000 for "Line Below/Discontinuous Underscore"—i.e. macron below, distinct from the ASCII underscore which is SP090000 ("Underline/Continuous Underscore")—and the "A" (Arabic letter) series GCGID AD470009 for the ḏāl, for example. Unicode's Latin Extended Additional block includes the following capital "Line Below" characters with the macron below diacritic, for Semitic transcription (it includes a pre-composed ẖ only in lowercase):

  • U+1E06Ḇ LATIN CAPITAL LETTER B WITH LINE BELOW
  • U+1E0EḎ LATIN CAPITAL LETTER D WITH LINE BELOW
  • U+1E34Ḵ LATIN CAPITAL LETTER K WITH LINE BELOW
  • U+1E3AḺ LATIN CAPITAL LETTER L WITH LINE BELOW
  • U+1E48Ṉ LATIN CAPITAL LETTER N WITH LINE BELOW
  • U+1E5EṞ LATIN CAPITAL LETTER R WITH LINE BELOW
  • U+1E6EṮ LATIN CAPITAL LETTER T WITH LINE BELOW
  • U+1E94Ẕ LATIN CAPITAL LETTER Z WITH LINE BELOW

However, this does not cover the entire ISO basic Latin alphabet, and IBM's reference glyphs for the APL characters show them both underlined and oblique, and tables simulating them with markup may follow suit. Unicode's Mathematical Alphanumeric Symbols block includes italic characters for use in notations where they are contrastive with non-italic characters. Unicode also includes combining forms of the macron below and underscore in the Combining Diacritical Marks block; the characters above canonically decompose with the former:

  • U+0331◌̱ COMBINING MACRON BELOW
  • U+0332◌̲ COMBINING LOW LINE

Keyboard layout

There are mnemonics associating an APL character with a letter: ? (question mark) on Q, (power) on P, ρ (rho) on R, (base value) on B, (eNcode) on N, (modulus) on M and so on. This makes it easier for an English-language speaker to type APL on a non-APL keyboard, providing one has visual feedback on one's screen. Also, decals have been produced for attachment to standard keyboards, either on the front of the keys or on the top of them.

APL keyboard layout.

Later IBM terminals, notably the IBM 3270 display stations, had an alternate keyboard arrangement which is the basis for some of the modern APL keyboard layouts in use today.

Further APL characters were available by overstriking one character with another. For example, the log symbol (⍟) was formed by overstriking ⇧ Shift+P with ⇧ Shift+O. This extended the graphic abilities of the earlier teleprinters, but made it more complex to correct errors and edit program lines.

New overstrikes were introduced by vendors as they produced versions of APL tailored to specific hardware, system features, file systems, and so on. Further, printing terminals and early APL cathode-ray terminals were able to display arbitrary overstrikes, but as personal computers rapidly replaced terminals as a data-entry device, APL character support became provided as an APL Character Generator ROM or a soft character set rendered by the display device. With the advent of the modern PC, APL characters were defined in specific fonts, eliminating the distinction between overstruck characters and standard characters.

Finally, the symbols were ratified in Unicode and given specific code points, with unambiguous interpretations, independently of the graphic font.

See also

Footnotes

External links