Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!grunt!strasser From: strasser@psych.psy.uq.oz.au (Michael Strasser) Newsgroups: comp.sys.mac.programmer Subject: Re: How to best do a linked list on Mac Message-ID: Date: 14 Jun 91 12:42:30 GMT References: <1CE00001.h0ibnk@tbomb.ice.com> Sender: news@grunt.psy.uq.oz.au (Grunt's News) Organization: Psychology Dept, University of Queensland, AUSTRALIA Lines: 21 I have looked at the code for the TList class in MacApp 2.0b9. It sets up a pseudo-linked list (which is really a variable- sized array in memory) with methods for insertion, deletion etc., and an Each method which is used to perform operations on each element in turn. All the elements must be the same size (which might be a limitation to you). Anyway (if I remember correctly), the coding uses SetHandleSize to change the size of the chunk of memory, and Munger to shift things around. During an Each "loop", any deletions are not made completely, but elements are marked as deleted, and actually tidied up at the end of all Each "loops" (which may be nested). I hope this helps you a bit. -- Mike Strasser Psychology Dept The University of Queensland