Differences between revisions 6 and 7
Revision 6 as of 2009-03-11 11:25:05
Size: 4649
Editor: KaiJaeger
Comment:
Revision 7 as of 2009-05-07 09:10:21
Size: 4701
Editor: SimonMarsden
Comment:
Deletions are marked like this. Additions are marked like this.
Line 55: Line 55:
Some APLs go further and allow complete customisation of which character is obtained for each key combination, so you can tailor the keyboard to suit yourself. Some APLs go further and allow complete customisation of which character is obtained for each key combination, so you can tailor the keyboard to suit yourself. Here's an [[APLXKeyboardLayouts|example from APLX]]

Entering APL Symbols

APL uses a variety of symbols to represent its built-in functions. Many of these are symbols that do not exist on a standard keyboard. Some of these will be familiar (for example, ÷ for divide, and for greater-than-or-equal). Others are specific to APL (for example for round-up or greater-of, and for finding out if two arrays are exactly the same in shape and contents).

In order to use APL, you need to be able to enter these symbols.

The exact way of doing so will vary from one APL to another, so the following is only a guide. You should consult the documentation which comes with your version of APL.

Using an extended keyboard layout

The traditional way of entering special APL symbols is via the keyboard using one of a number of extended keyboard layouts.

For illustration purposes, here is the 'unified' layout which is selected by default in APLX. This is configured as follows (the exact layout will vary according to the country in which you live and the specific model of keyboard):

aplx_keyboard.jpg

As you can see, each key is shown with up to four symbols. As with a conventional keyboard, a given character key generates a lower case character and, when depressed in conjunction with the Shift key, the corresponding upper case character. These are shown in black and red on the above diagram, in the lower-left and upper-left positions on each key.

In order to enter the other symbols, you use the AltGr key, which acts just like the Shift key in that it modifies the effect of another key. (In non-APL applications, AltGr is used to type various different characters, primarily ones that are unusual for the locale of the keyboard layout, such as foreign currency symbols and accented letters.) Using the AltGr key with another key produces the symbol displayed in green, on the lower right of each key in the diagram above. The remaining symbols (shown in blue, on the top right of each key) are entered by pressing the AltGr and Shift keys simultaneously. (Note: On a Macintosh keyboard, use the Alt or Option key instead of AltGr).

For example, the key in the upper row of the keyboard, inscribed with the digit 4, produces the following symbols:

  • If pressed by itself, the digit 4

  • If pressed with Shift, the dollar sign $

  • If pressed with AltGr, the APL less-than-or-equals symbol

  • If pressed with Shift and AltGr, the APL grade-up (sort) symbol

Most other modern APLs use a similar scheme to APLX, but you should check your vendor's documentation.

Choosing the keyboard layout

Two APL keyboard layouts are quite commonly used, and some APLs support both:

  • The Unified APL layout, as shown above. This is similar to an ordinary ASCII keyboard layout for unshifted and shifted keys. Special APL symbols are obtained by using AltGr or Shift-AltGr combinations. If you are learning APL we recommend that you use this layout if available.

  • The Standard or Traditional APL layout. This is based on the traditional APL keyboard where alphabetic keys unshifted give upper-case letters, shifted give APL symbols, and with the Alt or AltGr key give lower-case letters. It is recommended only for people who are used to programming in APL using a special APL keyboard.

Within these two schemes your APL may also let you choose between different language versions, for example a keyboard layout including all the characters needed to type Danish or French.

Some APLs go further and allow complete customisation of which character is obtained for each key combination, so you can tailor the keyboard to suit yourself. Here's an example from APLX

Suggestion: If you are learning the APL keyboard, you should check whether your APL includes an on-screen keyboard which you can display for reference purposes.

Other ways of entering APL

Some APLs also include facilities to enter APL characters by choosing from a palette of symbols on screen. For example, APLX has a QuickSym facility.


CategoryAboutApl - CategoryAplx

LearnApl/EnteringAplSymbols (last edited 2017-02-16 18:59:50 by KaiJaeger)