Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!snorkelwacker!think!kulla!barmar From: barmar@kulla (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Re: fill-pointers and initial-contents in Common Lisp Message-ID: <31009@news.Think.COM> Date: 20 Oct 89 20:25:42 GMT References: <2013@xyzzy.UUCP> Sender: news@Think.COM Distribution: usa Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 20 In article <2013@xyzzy.UUCP> ledford@berlin.rtp.dg.com () writes: >I have a question about the make-array function in Common Lisp as >defined in "Common Lisp the Language" by Guy L. Steele Jr. If a >non-nil fill-pointer is specified along with an initial-contents >value, can only the active part of the array be initialized or >do both the active and inactive parts have to be initialized. >I can't find where Steele addresses this situation. The fill pointer is only used by functions that the documentation specifically says use it. Since the MAKE-ARRAY documentation doesn't say anything about only the active portion being initialized, it must be the entire thing. In general, the fill pointer is only used by sequence and string functions; the fill pointer exists primarily to allow vectors to be used to implement growable sequences with performance comparable to that of lists. Most functions that operate on arrays of any rank ignore the fill pointer. Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar