This tutorial aims to teach some of the basics of the APL language.
It is adapted from an original version written to accompany MicroAPL's APLX interpreter which is not available any more.
The present version has been slightly modified so that examples should work with a number of APLs, including APL2, APL+Win, Dyalog and NARS2000.
The core APL language is similar in all these products, although each vendor has added proprietory extensions. Where code is specific to a particular APL interpreter it will usually be indicated in the text.
Once you're familiar with the material covered here, you might also want to check out Further Topics in APL which covers some more advanced topics.
There is an exception, however: VisualAPL is fundamentally different from the other APLs. It follows a completely different paradigm, and for that reason doesn't fit into this tutorial. See AboutVisualApl for details.
The APL tutorial will be most effective if you actually try the example code in an APL interpreter. Several vendors provide free or low cost evaluation licenses:
To apply for a free educational license, or a cheap (£50/€75) non-commercial copy of Dyalog APL visit Dyalog's Download zone
Note that with a default installation of Dyalog, some of the examples won't work: Dyalog offers the system variable ⎕ML which can be set to various values. Only with ⎕ML←3 all examples will work. See DyalogMigrationLevels for details.
NARS2000, an Open Source APL, does not compete against the commercially available APL implementations, but it is a fully-fledged APL implementation. Apart from the last chapter (15) you can do everything mentioned in this tutorial with NARS2000. For details see Open Source APL: NARS2000
To download a time-limited evaluation copy of APL2 for Windows, visit IBM's Download page.
APL2000 offer their interpreters 'free' to educational establishments - contact them via their web site.
The Finn APL Idiom library (for first generation APL) and IBM's APL2 Phrases (for second generation APL) are useful references for students and professionals alike.
The APL font
To display the material in this tutorial properly, you need to ensure that your browser can correctly handle Unicode (UTF-8) encoding. That should do.
Here's a sample of text which should display in the APL font:
X ← 3 3⍴÷⍳9 ⋄ Y ← DATA[⍋DATA] ⍝ A comment
It should appear in your browser something like this:
(this is a picture, not text; it will always display APL chars)
If it looks more like this then something is wrong: