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,3e262b181f8a8c8a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Sequental IO and pointers References: <1133054249.548646.294110@g44g2000cwa.googlegroups.com> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:udOMwzvnIP/1brhC//niCbYa1d0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Nov 2005 09:02:53 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1133100176 66.159.65.1 (Sun, 27 Nov 2005 09:02:56 EST) NNTP-Posting-Date: Sun, 27 Nov 2005 09:02:56 EST Xref: g2news1.google.com comp.lang.ada:6648 Date: 2005-11-27T09:02:53-05:00 List-Id: ejijott@gmail.com writes: > pastebin snippet at http://pastebin.com/439265 For code this short, it is better to include it in the post, rather than putting on a website; that makes it easier to refer to in replies. > I've posted before in this group and I would just like to say thanks > for all the help im getting :) You're welcome - gratitude is appreciated :). > Can I actually export my Storage/Node types as defined in my code > snippet? Well, you can, but importing won't make sense; the pointers will not be valid. > Or would I have to add another type which is used to export only the > item, len and count variables and then when importing my data I feed > this in to my variable of type Storage? You don't need another type, just modify Save to not output the pointer. Then in Restore (which you don't show), you need to rebuild the linked data structure. That is the hard part; how does Restore know what objects are linked? Typically Save must output some object ID, which is _not_ the pointer. -- -- Stephe