Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!uwvax!sevenlayer.cs.wisc.edu!bothner From: bothner@sevenlayer.cs.wisc.edu (Per Bothner) Newsgroups: comp.lang.lisp Subject: Re: Clarification of array semantics needed Message-ID: <11839@spool.cs.wisc.edu> Date: 29 Nov 90 17:54:30 GMT References: <11765@spool.cs.wisc.edu> <1990Nov20.101626.13488@hellgate.utah.edu> Sender: news@spool.cs.wisc.edu Organization: U of Wisconsin CS Dept Lines: 31 In article <1990Nov20.101626.13488@hellgate.utah.edu> moore%cdr.utah.edu@cs.utah.edu (Tim Moore) writes: ... a posting that clears up some of my questions. But there still seems to be inconsistencies in CLtL:2. >>* Page 456, line 12: "but this may be achieved ... by creating >>a new array and modifying the array argument to be displaced..." >>seems to be contradicted by p 457, line 19. >> >p457, line 19 applies only to arrays that weren't created with the >:adjustable argument to make-array, and thus isn't really relevent. But p 457 lines 19- still contradict p 456 lines 12-15. The new semantics says that one is *never* allowed to "modify the ARRAY argument to be DISPLACED to the new array." It looks like this paragraph (on p 456) should have been removed for the 2nd edition, but wasn't. >>If I have: >> (setq B (adjust-array A ...)) >>does the phrase "the result" refer to B or A? >> >Both. The whole point of adjust-array is that its return value is eq >to its array argument, as long as A is adjustable. The question is for when A is *not* adjustable. My reading is that then the adjust-array is equivalent to a make-array, except that A is used as a kind of default :initial-contents. Is this a reasonable reading? -- --Per Bothner bothner@cs.wisc.edu Computer Sciences Dept, U. of Wisconsin-Madison