Hi!

i am having trouble sorting an array using a for loop.

the problem occurs when using iterations i and i+1

for example

count:=0

for i:=0 to count do begin

if a* > a[i+1] then begin
....*

end

count+1

end

problem is when the for loops reaches the LAST array value i , i+1 does not exist hence the problem.

I have tried using

" for i:=0 to count-1 do begin"

this does not help.

any suggestions?