Path: utzoo!utgpu!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!ucbvax!snooze.UUCP!layer From: layer@snooze.UUCP (Kevin Layer) Newsgroups: comp.lang.lisp Subject: Re: Allegro CL bug? Message-ID: <8811071735.AA14409@snooze> Date: 7 Nov 88 17:35:54 GMT References: <8811041121.AA02724@ucbvax.Berkeley.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Lines: 37 ++ From: friedman@porthos.rutgers.edu (Gadi ) ++ ++ I am using ++ ++ Allegro CL 3.0.1.beta [sun4] (7/29/88 23:05) ++ Copyright (C) 1985-1988, Franz Inc., Berkeley, CA, USA ++ ++ and am tring to setf array values using (apply #'aref array list)) ++ ++ (setq test (make-array '(2 2))) ; works ++ (apply #'aref test '(1 1)) ; works (returns the correct element) ++ (setf (apply #'aref test '(1 1)) 2) ; DOES NOT WORK. ++ This should work, as described in CLtL pg 95 and 291. ++ There is patch for this bug, which will be sent to you under separate cover. ++ From: hedrick@geneva.rutgers.edu (Charles Hedrick) ++ ++ Unless you really don't know the number of dimensions of your array in ++ advance, (apply #'aref array list) sounds to me like it's going to be ++ inefficient. It's going to be particularly hard to produce good ++ compiled code for it. I agree that apply is better than eval, but not ++ by that much. At any rate, the inverse of aref in Allegro CL appears ++ to be excl::.inv-s-aref. So you can probably do ++ ++ (apply #'excl::.inv-s-aref newvalue array subscript-list) ++ ++ This will work until we get Franz to make (setf (apply #'aref ... ++ work. You are correct, this is the proper workaround in the absence of the patch. Kevin Layer Franz Inc.