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
- A+ has upper- and lowercase alphabetic characters,
but no underscored characters.
Both cases can be used in names.
- 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.
- 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.
- System commands begin with "$" instead of ")".
- $load does not initially clear the active workspace, acting instead like
)copy.
- $si shows the state indicator with the suspended function at the bottom.
- The following words are reserved:
if,
else,
do,
while,
case,
time,
Inf,
and those names reported by the $sfs system command.
Environmental
- Comparison tolerance is always 1e-13.
- 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.
- All expressions yield a result.
Where a result is absent in APL it is often the Null in A+.
- A+ provides an unambiguous function call syntax f{...;...;...} in
addition to infix notation.
Language
- Index origin is always 0.
- 0ß0 produces a domain error.
- nß0 does not produce an error when n is nonzero: it produces Inf when n is positive and ¢Inf when n is negative.
- Leading axis default in Reduce, Scan, Catenate, Take, Drop, Reverse, Rotate, Compress, Replicate, Expand.
- Nor, Nand, Factorial, and Binomial are not implemented.
- Reduce and Scan are restricted to the functions: +«ÄÓ©^.
Ä/É0 produces Inf and Ó/É0 produces ¢Inf.
- Inner Product is restricted to the following cases: +.«, Ä.+, and Ó.+.
- Outer Product is restricted to the following functions: +«-ß*ÄÓ<¤=¦>¨|.
- Take and Drop are restricted to a single-element left argument.
- 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.
- 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.
- The arguments to dyadic Å and É must be the same type or both numeric.
- 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 19952001 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.
|