From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.237.45.231 with SMTP id i94mr19962601qtd.4.1467424511355; Fri, 01 Jul 2016 18:55:11 -0700 (PDT) X-Received: by 10.157.63.245 with SMTP id i50mr991270ote.9.1467424511317; Fri, 01 Jul 2016 18:55:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!f89no1372375qtd.0!news-out.google.com!d62ni9532ith.0!nntp.google.com!jk6no8778574igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 Jul 2016 18:55:11 -0700 (PDT) In-Reply-To: <3f7651d5-51aa-4f6b-b468-a784b91515ea@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=216.121.226.25; posting-account=ENgozAkAAACH-stq5yXctoDQeZQP2E6J NNTP-Posting-Host: 216.121.226.25 References: <66c14298-c62d-4f4b-b0c0-e969454f9334@googlegroups.com> <3f7651d5-51aa-4f6b-b468-a784b91515ea@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4ae86e67-7f0f-4b98-a24f-a13b02bb373c@googlegroups.com> Subject: Re: Generic Embedded List Nodes From: Warren Injection-Date: Sat, 02 Jul 2016 01:55:11 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30997 Date: 2016-07-01T18:55:11-07:00 List-Id: On Friday, 1 July 2016 15:50:40 UTC-4, brbar...@gmail.com wrote: > Another suggestion is to add a numerical index to each node, as well as s= ome > identifier (maybe a string or some other suitable type), and use a hash f= unction > to calculate the index from the identifier. Assuming you also use Ada ac= cess > variable to link the nodes together, this might be a useful way to implem= ent > the type of design you seem to have in mind. Linkages in a triply linked > list (see Knuth, Vol I index) can be handled this way, so you can have=20 > hierarchical structures. >=20 > Bruce B. I do actually have a numerical index already (as I mentioned before). I can= use the socket file descriptor (POSIX) to index an array to directly arriv= e at a lookup. But where that [fd] approach is clumsy is having to copy th= at file descriptor into each list node of the same object. Warren