Hi Darrel, I tested the sorting snippet you have posted, using a rather interesting swapping technique.
The code worked, but now and than, it was yielding very fanny results.
From a closer code analysis, I came to the conclusion that :
Code:
If CounterA > 0 then CounterA=CounterA-2
should be corrected with:
Code:
If CounterA > 1 then CounterA=CounterA-2
After the correction, I didn't see any fanny result for the rest of my testing period.
The explanation I have given is the following:
If CounterA = 1 then CounterA - 2 = 255 and this screw up everything.
Can you confirm?
Al.
Bookmarks