Date: Tue, 10 Dec 1996 03:29:33 GMT Server: NCSA/1.4.2 Content-type: text/html
The changes below are effective July 25, 1996.
The newly installed version of ZPL is improved in two ways: A multitude of small language changes have been incorporated to make the language more convenient/powerful, and many bugs have been fixed. The resulting compiler is considerably more stable, and the language is more convenient. However...
MOST EXISTING ZPL PROGRAMS WILL HAVE TO CHANGE SOMEWHAT.
Though possibly causing some inconvenience for the moment, this is a one-time change. ZPL is essentially stable, with all subsequent research being applied to a new language.
The following language feature changes will likely require modifications to existing programs:
unsigned shortint ---> ushortint unsigned integer ---> uinteger unsigned longint ---> ulongint
& ---> band(a,b) bitwise and of integers a, b | ---> bor(a,b) bitwise or of integers a, b ~ ---> bnot(a) bitwise negation of integer a ^ ---> bxor(a,b) bitwise exclusive or of integers a, b << ---> bsl(a,b) integer a left shifted b bit positions >> ---> bsr(a,b) integer a right shifted b bit positions
and ---> & or ---> | (! continues to be correct for logical negation)
[[1..m, i..n]] ---> [1..m, i..n] [[1..m, *]] ---> [1..m, *]but
[[1..m,i..n] at west] [[1..m, 1..n] with M]require both sets of brackets. This is not yet implemented.
procedure Example (X, Y:[2] float);becomes
procedure Example (X, Y:[,] float);The inheritance capability is available with all region specifications -- empty dimensions are inherited from the enclosing scopes.
Reduce +\ ---> +<< Scan +\\ ---> +|| Flood \\\ ---> >>The heuristic here is that the result of reduce (<<) is "smaller" than the operand, the result of scan (||) is the same size as the operand, and the result of flood (>>) is "larger" than the operand.
[R <- S] A := ...;is no longer legal. Accordingly, the partial reduce and flood operators have changed in that both specify a region following the operator which describes the operand. This region, together with the region "on the statement" which describes the result, supply the needed region information for these operations.
Thus, for example in the partial reduction
[1..n, 1] A := +<<[1..n,1..m] B; --Sum B's rows, store in A's col 1the region following the operator is the region of the operand, i.e. the region to be reduced. The region on the statement specifies the result region, which since relative to the operand region it has the second as a collapsed dimension, the elements of each row are added, and the result is stored into the first column of A.
Similarly, for the flood
[*,1..m] Fl := >>[3,1..m] A; -- Replicate A's 3rd row into Flthe region following the operand specifies the array to be replicated, and the region on the statement specifies the region of the result. So, relative to the result region the first dimension is collapsed.