查找?
用那个函数,FIND?

解决方案 »

  1.   

            mynum:=5;        for i:=0 to 9 do
            begin
                    temparr[i]:=i;
            end;        for I:=0 to 9 do
            begin
                    if temparr[i]=mynum then
                    begin
                        label1.Caption:='Mission accomplished! Index:'+inttostr(i);
                        exit;
                    end
                    else
                        label1.Caption:='Mission failed!';
            end;