I suppose that you corrected the array definition from[6] to [5].

And then the check in the program:

Code:
If CounterA < 5 then goto SortLoop
to this:
Code:
If CounterA < 4 then goto SortLoop
Ioannis