The A Project->Overview of A->Relation to other APLs
Relation to other APLs
Home
  First Encounter
  Current Status
  GNU License
Downloads
Getting Started
  Examples
  Mississippi
Overview of A
  Structure of Data
  Syntax
  Relation to other APLs
  Language Reference
  System Fns and Vars
  Functions
Where next
  Quibbles
  Materials

Vector Home

Some Differences between A+ and other APL dialects

This page has been reproduced from original A+ documentation provided by Morgan Stanley at www.aplusdev.org. Copyright remains with the authors.

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 .globalûexpression or cxt.globalûexpression 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.


    Environmental

  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.


    Language

  12. Index origin is always 0.

  13. 0ß0 produces a domain error.

  14. nß0 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 (LÅR) 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 (LÉR) 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 LÒR when L does not contain zeros and R is empty.

Back to Home page

doc@aplusdev.org© Copyright 1995–2001 Morgan Stanley Dean Witter & Co. All rights reserved.

© British APL Association 2001
Please send any comments to Adrian Smith via adrian@causeway.co.uk - thank you.