🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.flame.pascal
Article #49

Re: Help !!! Can't save pointer list to file

#49
From: R.E.Donais
Date: Tue, 11 Mar 1997 00:00
32 lines
2244 bytes
"Hugo Palma" <hmpalma@mail.telepac.pt> wrote:

>I'm doing a project,but i'm just not able to save a variable of type LIST
>as shown below.
>I'm only able to save the first segment of the list,and none of the next.
>Can anyone please help me.
>Thanks.
>
>type
>   list=^no;
>   no=record
>      v:integer;
>      seg:list;
>      end;
>
>var
>   p:list;
>

Mmmmm, you stopped short of including the code that you have that succeeds in
writing the first entry.  A small example would have been nice.

Have your procedure that writes the list implement a while loop, stopping when
the list pointer becomes nil.  After writing the current list entry it would
advance the pointer to the "next" seg.  This assumes that the last entry in the
list is identified by a nil seg field.  Also be certain that the pointer you use
to "walk" the list is a local variable or a parameter by value.  You wouldn't
want to loose the list by changing the actual list pointer.

    ...red
cc
Technical Details
Message-ID: <33266a5f.59896756@news.southeast.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bc2d75$4541e060$LocalHost@host.telepac.pt>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10261c,e6cf518a5140afcc
X-Google-Attributes: gid10261c,public
X-Google-Thread: 102601,e6cf518a5140afcc
X-Google-Attributes: gid102601,public
X-Google-Thread: 10c950,e6cf518a5140afcc
X-Google-Attributes: gid10c950,public
X-Google-Thread: 10baee,e6cf518a5140afcc
X-Google-Attributes: gid10baee,public
X-Google-Thread: 10eb32,e6cf518a5140afcc
X-Google-Attributes: gid10eb32,public
X-Google-Thread: 10a7f1,e6cf518a5140afcc
X-Google-Attributes: gid10a7f1,public
X-Google-Thread: 1006de,e6cf518a5140afcc
X-Google-Attributes: gid1006de,public
X-Google-Thread: ff90a,e6cf518a5140afcc
X-Google-Attributes: gidff90a,public
From: rdonais@southeast.net (R.E.Donais)
Subject: Re: Help !!! Can't save pointer list to file
Date: 1997/03/11
Message-ID: <33266a5f.59896756@news.southeast.net>
X-Deja-AN: 224672124
References: <01bc2d75$4541e060$LocalHost@host.telepac.pt>
Organization: Southeast Network Services, Inc.
Newsgroups: alt.flame.pascal,comp.lang.pascal.ansi-iso,comp.lang.pascal.delphi.misc,comp.lang.pascal.misc,ctdl.lang.pascal,de.comp.lang.pascal.delphi,de.comp.lang.pascal.misc,fj.lang.pascal,fr.comp.lang.pascal,maus.lang.tpascal,relcom.comp.lang.pascal,relc