Hello everybody,
I've been absent for a while, but hopefully you'll see me here again
more frequently. Happy new year!
Now my problem:
I've got this method that counts the number of occurrences in between a
defined range of bands. For example the bands are <5, <10, >10 and the
array of numbers is
#(2 6 8 9) then I expect an array back of #(1 3 0). I made a test for
this and guess what, the first time it works, but subsequent times it
adds the score onto the previous. So the first time it returns #(1 3
0), the second time it returns #(2 6 0) and so on.
I really can't see the logic of this other than some internal
stack/cache not being cleared. And the 'funny' thing is, if you step
through the method, it all works as expected, so I guess it's some kind
of optimisation.
The following link has a package with a Demo class and a DemoTest class
demonstrating the issue.
<
http://www.bracht.nildram.co.uk/ConfusedStackDemo.pac>
Anybody any suggestion as to how to avoid this? Blair/Andy - is this a
bug?
Ted