comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: "In reverse" in for loop acting weird.
Date: Sun, 29 Sep 2002 18:31:57 GMT
Date: 2002-09-29T18:31:57+00:00	[thread overview]
Message-ID: <xGHl9.55829$wH.6681@sccrnsc01> (raw)
In-Reply-To: PFGl9.81453$5M3.3538442@e3500-atl2.usenetserver.com

>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.



  parent reply	other threads:[~2002-09-29 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-29 17:28 "In reverse" in for loop acting weird gilrain
2002-09-29 17:59 ` Martin Dowie
2002-09-29 21:15   ` Martin Dowie
2002-09-29 18:31 ` tmoran [this message]
2002-09-29 19:17   ` gilrain
2002-09-29 18:49 ` Jeffrey Carter
2002-09-29 19:19   ` gilrain
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox