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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9ce5fb49dc74582f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sun, 19 Nov 2006 13:17:39 -0600 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: generic question References: <1163959439.299036.129940@e3g2000cwe.googlegroups.com> Date: Sun, 19 Nov 2006 20:17:20 +0100 Message-ID: <87mz6nnt4v.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:TNjNtVNk1CxPyfwrQnH5+qMIbj4= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.209.199 X-Trace: sv3-hEf93RdzdIdhqlkVN9HIEQbffHmfth/1HxfvM91HbyFszKodvdE+xLmBjhfMkk9zYTEusRfxpkwb6RR!xezaUElFH66vJifR7LSLKhyZ9MVfeSC/cSRSeayyVMylR7mVduvDpKuO5646AA3xX9v+5xfI3bc= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7565 Date: 2006-11-19T20:17:20+01:00 List-Id: markww writes: > type NODE_REC is > record > unknown_data_type : generic; -- not sure how to express > this in ada > Next_Node : NODE_REC_PTR; > Prev_Node : NODE_REC_PTR; > end record; generic type T is private; package P is type Node; type Node_Ptr is access Node; type Node is record Data : T; Prev, Next : Node_Ptr; end record; end P; HTH See also the predefined containers, in particular Ada.Containers.Doubly_Linked_Lists [1] [1] http://www.adaic.com/standards/05rm/html/RM-A-18-3.html -- Ludovic Brenta.