请教Result指向的问题
function SortInt(const Arrayint :PArrayint; const Rgth:Integer):PArrayint;
var
i,j,TempIndex:Integer;
begin //F1
for i := 0 to Rgth do //F2
begin
for j := i - 1 to Rgth do
begin
TempIndex := Result^[i];
if TempIndex > Result^[j + 1] then
begin
Result^[i] := Result^[j + 1] ;
Result^[j + 1] := TempIndex;
end;
end;
end;
其中
Type
TArrayint = array of Integer;
PArrayint = ^TArrayint;
请问Result是怎么指向Arrayint ?
调用时Arrayint地址为:$459FCB,
当程序运行到F1的时候各地址如下所示:
Arrayint = $459FCB
Result没有地址
当程序运行到F2的时候各地址如下所示:
Arrayint看不到地址
Result = $459FCB
说明:在watch listr观看地址