Impressum/Kontaktparent nodes: APL concepts in Smalltalk

Differences

Since the evaluation of expressions in APL is from right to left and in Smalltalk the other way round we need to reverse the order of execution.

Scan

But there is still the Scan operator, which internally calculates the running values from right to left:

+\ 1 2 3 will lead to the evaluation of (1) (1+2) (1+2+3)
-\ 1 2 3 will lead to the evaluation of (1) (1-2) (1-2-3)

And each expression evaluated from right to left (APL), resulting in:

+\ 1 2 3 will lead to 1 3 6
-\ 1 2 3 will lead to 1 -1 2

In Smalltalk the results are:

+\ 1 2 3 will lead to 1 3 6
-\ 1 2 3 will lead to 1 -1 -4

The same goes for divide.

Numbering of Axis

Well there is no difference, since I have kept the original APL order.

Index Origin

In APL there is the possibilty to switch the index origin from 0 to 1 and vice versa.
In Smalltalk the index origin is 1 and can't be changed.

Precision

In APL you can set the precision, wheras in Smalltalk the implicit precision of Smalltalk calculations is used.
This means that a division results in fractions (not floats). Also multiplications/factorials result in big numbers.