Jump to content

Digital encoding of APL symbols

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by LongTermWikiUser (talk | contribs) at 19:41, 15 January 2015 (See also: link to APL programming language page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The APL code page is an EBCDIC-based code page used specifically to write programs written in the APL programming language.

Character set

APL has always been criticized for its choice of a unique, non-standard character set.[citation needed] The observation that some who learn it usually become ardent adherents shows that there is some weight behind Iverson's idea that the notation used does make a difference. In the beginning, there were few terminal devices which could reproduce the APL character set—the most popular ones employed the IBM Selectric print mechanism along with a special APL type element. 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; however, the problem of entering APL characters requires the use of input method editors or special keyboard mappings, which may frustrate beginners accustomed to other languages.

From a user's standpoint, the additional characters can give APL a special elegance and concision not possible in other languages, using symbols visually mnemonic of the functions they represent.[citation needed] On the other hand, it can lead to a ridiculous degree of complexity and unreadability, particularly when the symbols are strung together into a single mass without any comments. It can be unreasonably difficult and time consuming to enter and edit such APL statements.

Most APL symbols are present in Unicode, in the Miscellaneous Technical range,[1] although some APL products may not yet feature Unicode, and some APL symbols may be unused or unavailable in a given vendor's implementation. Missing from Unicode are the underscored alphabetic characters. Usage of underscored APL alphabetic characters has been eliminated in at least one APL implementation and deprecated in others.[citation needed]

Keyboard layout

Note the 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.

A more up-to-date keyboard diagram, applicable for APL2 and other modern implementations, is available at WikensOnline Union APL large keyboard layout for Windows, actual photo + diagram here and NARS2000 APL keyboard layout here.

Additional 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 complicated correcting mistakes and editing program lines. This may have ultimately been the reason for early APL programs to have a certain dense style—they were difficult to edit.

Many overstrikes, although appealing, are not actually used. 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 capable of displaying arbitrary overstrikes, but as personal computers rapidly replaced terminals as a data-entry device, APL character support was now provided as an APL Character Generator ROM or a soft character set rendered by the display device. With the advent of Windows, APL characters were defined as just another complete font, thus the distinction between overstruck characters and standard characters having been eliminated.

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. Better terminals, namely display devices instead of printers, encouraged the development of better full-screen editors, which had a measurable improvement in productivity and program readability.

See also

References

  1. ^ "The Unicode Standard 5.1 Code Charts: Technical Symbols U+2300-U+23FF" (PDF). Unicode Standard 5.1. Unicode Consortium. Archived from the original (PDF) on 2 October 2008. Retrieved October 12, 2008. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)