Hi,
I am having trouble with AREF and multi dimensional arrays. For example
(defun a ()
(let ((rv (make-array '(10 20) :element-type '(unsigned-byte 32)))
(pos 0))
(dotimes (y 10)
(dotimes (x 20)
(setf (aref rv y x) pos)
(incf pos)))
rv))
(compile 'a)
(format t "~&Expecting 199.~%")
(format t "~&Got ~A.~%" (aref (a) (1- 10) (1- 20)))
Produces
> Expecting 199.
> Got 151665505.
where as with
(dotimes (pos 200)
(setf (row-major-aref rv pos) pos))
it does what is expected.
The call to COMPILE is important. It works when not calling COMPILE.
ECL version is: 2f1e68128e16f332
BUILT USING: make realclean && ./configure && make
ARCH: A Mac Pro (64bit Xeons) running Snow Leopard
Cheers
Mark
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Ecls-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecls-list