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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a074a0043177938 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-11 14:43:16 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newspump.monmouth.com!newspeer.monmouth.com!newsfeed.mathworks.com!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!attbi_s51.POSTED!not-for-mail From: Freejack Subject: Re: Type declared in record? Newsgroups: comp.lang.ada Message-ID: References: User-Agent: Pan/0.11.4 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Marius Amado Alves" NNTP-Posting-Host: 12.245.85.50 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s51 1068590595 12.245.85.50 (Tue, 11 Nov 2003 22:43:15 GMT) NNTP-Posting-Date: Tue, 11 Nov 2003 22:43:15 GMT Organization: Comcast Online Date: Tue, 11 Nov 2003 22:43:15 GMT Xref: archiver1.google.com comp.lang.ada:2384 Date: 2003-11-11T22:43:15+00:00 List-Id: On Tue, 11 Nov 2003 17:08:56 -0500, Marius Amado Alves wrote: > On Tue, 2003-11-11 at 20:19, Freejack wrote: > > This is not representative of any problem I can think of. Maybe you want > an array component, maybe a generic type, maybe something else. Please > rethink your problem and restate it. Right now I'm working on Variant Records. For example... generic type Item is private; package storage is type Data_Structure is (Tree, Stack, List); type Store(DatConf : Data_Structure) is private; private type Node_Pointer is access Store; subtype BlockSize is Positive range 1..1024; type Item_Array is array(BlockSize) of Item; type STree is record Value : Item; LPointer : Node_Pointer; RPointer : Node_Pointer; TPointer : Node_Pointer; -- Could be used for Threading, or NULL. -- end record; type DLinkedList is record Element : Item; Next : Node_Pointer; Prev : Node_Pointer; end record; type Store (DatConf : Data_Structure) is record case DatConf is when Tree => TreeConf : STree; when Stack => StackConf : Item_Array; when List => ListConf : DLinkedList; end case; end record; end storage; This is all swell...but working with it would be a bit of a pain, so I'm toying around with other ideas that might give me better results. Freejack.