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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32b8be7d0d9988ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-29 11:31:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!sdd.hp.com!usc.edu!attla2!ip.att.net!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: "In reverse" in for loop acting weird. References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1033324317 12.234.13.56 (Sun, 29 Sep 2002 18:31:57 GMT) NNTP-Posting-Date: Sun, 29 Sep 2002 18:31:57 GMT Organization: AT&T Broadband Date: Sun, 29 Sep 2002 18:31:57 GMT Xref: archiver1.google.com comp.lang.ada:29414 Date: 2002-09-29T18:31:57+00:00 List-Id: >for j in reverse -15..15 loop > case integer(abs(coefficients(j))) is > ... > result(j+16) := ... There is nothing there that depends on the order of j values. If coefficients(7) = 3, then result(7+16=23) := '3', quite independent of any previous or later value of j. Perhaps you want result(16-j) instead of result(16+j), so result(-7+16=9) would get the '3'. Getting stuck on this kind of problem is a good indication it's time to take a break from your program.