If you change the TYPE to POINTER TO REAL (also 64-bits) there is no problem.

- Code: Select all
`MODULE PrivTest;`

TYPE

Vector* = POINTER TO ARRAY OF LONGINT;

PROCEDURE Rotate* (vec : Vector; s : INTEGER) : Vector;

VAR

n, k : INTEGER;

w : Vector;

BEGIN

IF vec # NIL THEN

n := LEN (vec); k := n;

NEW (w, n);

WHILE k > 0 DO DEC (k); w [(k + s) MOD n] := vec [k] END

END;

RETURN w

END Rotate;

END PrivTest.