[求助]一个问题"SUB 过程"
private sub f(a() as single,n as integer)dim i as integer ,j as integer ,k as integer , t as single
for i=1 to n-1
k=i
for j=i+1 to n
if abs(a(j))>abs(a(k)) then k=j
next j
a(k)=a(i):a(i)=a(k)
next i
end sub
private sub command1_click()
dim x(5) as single
x(1)=5:x(2)=-7:x(3)=5:x(4)=12:x(5)=-3
call f(x,5)
print x(1);x(2);x(3);x(4);x(5)
end sub
结果是:5 -7 5 5 -3
我想问一下第四项为什么会是5??