Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!casseres@apple.com From: casseres@apple.com (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Re: How to best do a linked list on Mac Message-ID: <14026@goofy.Apple.COM> Date: 12 Jun 91 16:34:50 GMT References: <1991Jun10.002416.5656@gn.ecn.purdue.edu> Sender: usenet@Apple.COM Organization: Apple Computer Lines: 17 In article , francis@zaphod.uchicago.edu (Francis Stracke) writes: > My favorite solution is to declare an array type, then allocate a > handle to such an array, and resize it dynamically. > > That way you can do it with only one handle (though you may want to > have an array of handles, if your records are large), and you can > index into the array rather than searching the list. This works fine but it isn't a linked list -- it's a dynamically sized array. It's good as long as all you will do is add elements at the end or remove them from the end, but it doesn't allow you to add elements in the middle, or remove them from the middle and reclaim their storage space. David Casseres