Appendix: Some A+ and APL Differences

For the most part, A+ is very similar to other dialects of APL, but there are some significant differences that are important to know about.

This is not meant to be an exhaustive list of differences, but rather, a starting point for an APL programmer, to help to prevent confusion about A+ conventions. This list does not, for instance, include references to the many extensions over most of the other APL implementations.

    Object Names, System Commands, Reserved Names

  1. A+ has upper- and lowercase alphabetic characters, but no underscored characters. Both cases can be used in names.

  2. There are no quad-names. System function names begin with _ and are not distinguished names, and system variable names begin with `.   System variables are set and referenced only through system functions or system commands.

  3. There are no local lists in function headers; names are automatically localized. All unparenthesized explicitly-assigned unqualified names are strictly local within a function. Global names can be assigned by (global)expression or .globalexpression or cxt.globalexpression or the like. There are no semi-globals: all variables are lexically scoped and are either local or global.

  4. System commands begin with "$" instead of ")".

  5. $load does not initially clear the active workspace, acting instead like )copy.

  6. $si shows the state indicator with the suspended function at the bottom.

  7. The following words are reserved: if, else, do, while, case, time, Inf, and those names reported by the $sfs system command.


  8. Comparison tolerance is always 1e-13.

  9. There is no del-editor; use XEmacs in an A+ session log. In other files, use XEmacs and copy into an A+ session, or use the F2 key to execute a line or the F3 key to load a program into A+. Use $load in an A+ session to load a script, executing it in the process.

  10. All expressions yield a result. Where a result is absent in APL it is often the Null in A+.

  11. A+ provides an unambiguous function call syntax f{...;...;...} in addition to infix notation.


  12. Index origin is always 0.

  13. 00 produces a domain error.

  14. n0 does not produce an error when n is nonzero: it produces Inf when n is positive and Inf when n is negative.

  15. Leading axis default in Reduce, Scan, Catenate, Take, Drop, Reverse, Rotate, Compress, Replicate, Expand.

  16. Nor, Nand, Factorial, and Binomial are not implemented.

  17. Reduce and Scan are restricted to the functions: +ө^.     /0 produces Inf and /0 produces Inf.

  18. Inner Product is restricted to the following cases: +., .+, and .+.

  19. Outer Product is restricted to the following functions: +-*<=>|.

  20. Take and Drop are restricted to a single-element left argument.

  21. Member (LR) does not ignore the rank of its right argument: it searches the items of the right argument for cells of the left argument that are the same shape as the items of the right argument. To get the traditional APL effect, ravel the right argument.

  22. Find (LR) does not ignore the rank of its left argument: it searches the items of the left argument for cells of the right argument that are the same shape as the items of the left argument. To get the traditional APL effect, ravel the left argument.

  23. The arguments to dyadic and must be the same type or both numeric.

  24. Reshape uses fill elements for LR when L does not contain zeros and R is empty.© Copyright 1995–2008 Morgan Stanley Dean Witter & Co. All rights reserved.