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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c3109ca91f11de99,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-06 20:13:36 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Coder_rick@yahoo.com (Coder87c) Newsgroups: comp.lang.ada Subject: Lists within Lists or Nested Linked Lists... Date: 6 Mar 2004 20:13:36 -0800 Organization: http://groups.google.com Message-ID: <95941c2c.0403062013.1a9464cd@posting.google.com> NNTP-Posting-Host: 24.17.188.159 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1078632816 3900 127.0.0.1 (7 Mar 2004 04:13:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 7 Mar 2004 04:13:36 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6112 Date: 2004-03-06T20:13:36-08:00 List-Id: Hello everyone, i been a Ada programmer in college for about 8 months now. Right now we are doing Lists within Lists or Nested Linked Lists I cant decided which name is right. Dont worry I wont be asking for anyone to do my work for me, Im just tottaly baffled. So I got something like this... TYPE TaskNode; TYPE TNodePtr IS ACCESS TaskNode; TYPE TNode IS RECORD Name : Positive; Work : Natural; Worked : Natural; Next : TNodePtr; END RECORD; TYPE PNode; TYPE Scheduler IS ACCESS PNode; SUBTYPE PNodePtr IS Scheduler; TYPE PNode IS RECORD Number : Positive; TDone : Natural; TLeft : Natural; head : TNodePtr; tail : TNodePtr; Next : PNodePtr; END RECORD; So basically if the program was complete the user could assign a number like 1 and have its Tdone be 5 and Tleft be 4 Then the user could assign another number like 5 and have its Tdone be 3 and Tleft be 10 It cant keep creating diffrent Numbers and assigned it Tdones and Tlefts. It can also take awwy Tdones.. Now my problem is... How do I simply assign start? Like how would a function look like just to assign a number to number? With no Tdones or Tlefts? Right now I got something like this A := new Pnode'(Number,0,0,NULL,NULL,NULL); but this assigns Pnode to something and when I recall it just erases A and replaces it with the new thing. Sorry if this is unclear.