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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d7204ff396525aa X-Google-Attributes: gid103376,public From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) Subject: Re: Please help link list! Date: 1997/12/05 Message-ID: <881301956.91snx@jvdsys.nextjk.stuyts.nl>#1/1 X-Deja-AN: 295376253 References: <01bd0074$856c1020$8d484893@default> Distribution: world Organization: *JerryWare HQ*, Leiden, Holland Newsgroups: comp.lang.ada Date: 1997-12-05T00:00:00+00:00 List-Id: In article <01bd0074$856c1020$8d484893@default> sabo@HHS.NET writes: >What am I doing wrong with this program? Three remarks up-front: 1) Disable HTML in your mailer, as this is very hard to read using an ascii based mailer 2) Use one of the standard Ada styles for writing code, this makes it much more readable for others 3) GNAT.IO is a gnat specific package, use the language standard IO packages Technically speaking you are doing nothing wrong with the program, when compiled it does exactly what you instructed it to do. Probably you mean it is not doing what you intended it to do. As this looks like an assigment, best thing to do is ask you instructor for help. If your assignment is to program a linked list, this is coming quite close, but the program contains several logic errors. A old-fashioned technique I find very useful for finding errors like this is to print out the program, take a blank sheet of paper, and execute it yourself. That is, write down the variables starting values, enter a number, follow the program, writing down the new values of the variables as they are updated. After a few iterations, check if the values the variables are assigned to are what you expected them to be. -- -- Jerry van Dijk | Leiden, Holland -- Consultant | Team Ada -- Ordina Finance | jdijk@acm.org