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,cd5005cccfba0311 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s72.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Topological Sort Help References: <1170618852.885855.258390@j27g2000cwj.googlegroups.com> <87sldllhpt.fsf@ludovic-brenta.org> <1170707421.136089.281290@l53g2000cwa.googlegroups.com> <87y7ncjq4y.fsf@ludovic-brenta.org> <1170728294.194370.133540@k78g2000cwa.googlegroups.com> <1170752808.678318.252960@l53g2000cwa.googlegroups.com> <1170897552.495666.223180@v33g2000cwv.googlegroups.com> In-Reply-To: <1170897552.495666.223180@v33g2000cwv.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s72 1170959917 12.201.97.213 (Thu, 08 Feb 2007 18:38:37 GMT) NNTP-Posting-Date: Thu, 08 Feb 2007 18:38:37 GMT Organization: AT&T ASP.att.net Date: Thu, 08 Feb 2007 18:38:37 GMT Xref: g2news2.google.com comp.lang.ada:9154 Date: 2007-02-08T18:38:37+00:00 List-Id: isaac2004 wrote: > the topological sort that i am trying to accomplish from this > structure will follow the algorithm that i have created from > others(its pretty much the same) the problem is im having trouble > setting up the while loop to traverse the array of digraph information An easy way to avoid confusing while loops is not to use them. Instead of Name : while Unintuitive_Negative_Logic_For_Loop_Continuation loop use Name : loop exit Name when Intuitive_Positive_Logic_For_Loop_Exit; While loops, with their continuation condition, are generally better if you're doing correctness proofs, but if you're not, using exit conditions is usually clearer and more intuitive. -- Jeff Carter "What I wouldn't give for a large sock with horse manure in it." Annie Hall 42