APL2C

APL2C is a nested APL implementation consisting of a complete interpreter, and a compatible compiler with some restrictions. It supports much of the functionality specified by the Extended APL standard ISO/IEC 13751:2001, including some features such as the Commute and Rank operators that were not widely supported at the time of its initial release. Development of APL2C began in 1991, and it was used in commercial applications before its public release. The compiler and its use in medical image analysis were presented at the 2000 APL conference. The implementation was later offered as a trial version, with a tutorial on using it presented at the 2001 APL conference.

APL2C's compiler generates C code that calls functions for primitives and other operations such as loading variables, removing interpreter dispatch overhead. Compiling allows a program to be distributed as an executable file, and allows the APL code to inter-operate with C. In order to compile, the generated code must be linked against a platform-specific shared library containing primitive implementations, as source code for the primitives is not distributed. Some dynamic functionality is also restricted: compiled programs can't dynamically create APL functions with, and can't pass arrays (rather than functions) as operands to user-defined operators.

Control structures
Control structures in APL2C are written using the Del character, which is not used for function definition because this is initiated with editor interaction rather than source code. All control structures consist of an opening  followed by an expression, and closed with   alone. For example, the following structure doubles  if it's less than 3. The interpretation of the control expression's result follows a proposal of F.H.D. van Batenburg. If the result is a non-negative number, the enclosed code is repeated that many times. A negative number indicates to repeat a number of times equal to the absolute value, but return to the controlling expression afterwards, allowing "while" to be implemented. A vector indicates counts for multiple sections, which are each preceded with a label-less, allowing "if-else" and "select" forms.