Differences between revisions 12 and 13
Revision 12 as of 2009-08-21 14:00:08
Size: 4771
Editor: KaiJaeger
Comment:
Revision 13 as of 2009-08-21 17:19:45
Size: 4657
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
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). In order to enter the other symbols, you use the Alt key <<FootNote(This is true for APLX, APL+Win & NARS2000; for Dyalog, use the Ctrl key; For APL2, refer to the documentation)>> which acts just like the Shift key in that it modifies the effect of another key. Using the Alt 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 Alt and Shift keys simultaneously. (Note: On a Macintosh keyboard, use the Alt or Option key instead of Alt).
Line 40: Line 40:
 * If pressed with !AltGr, the APL less-than-or-equals symbol {{{≤}}}  * If pressed with Alt, the APL less-than-or-equals symbol {{{≤}}}
Line 42: Line 42:
 * If pressed with Shift and !AltGr, the APL grade-up (sort) symbol {{{⍋}}}  * If pressed with Shift and Alt, the APL grade-up (sort) symbol {{{⍋}}}
Line 49: Line 49:
 * 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 '''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 !Alt or Shift-!Alt combinations. If you are learning APL we recommend that you use this layout if available.
Line 51: Line 51:
 * 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.  * 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 key give lower-case letters. It is recommended only for people who are used to programming in APL using a special APL keyboard.
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.Here are examples from [[APLXKeyboardLayouts|APLX]] 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 are examples from [[APLXKeyboardLayouts|APLX]]

Entering APL Symbols (2 of 15)

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 Alt key 1 which acts just like the Shift key in that it modifies the effect of another key. Using the Alt 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 Alt and Shift keys simultaneously. (Note: On a Macintosh keyboard, use the Alt or Option key instead of Alt).

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 Alt, the APL less-than-or-equals symbol

  • If pressed with Shift and Alt, 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 !Alt or Shift-!Alt 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 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 are examples 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

  1. This is true for APLX, APL+Win & NARS2000; for Dyalog, use the Ctrl key; For APL2, refer to the documentation (1)

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