请教Result指向的问题

taste品味 2010-10-14 12:41:04
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观看地址
...全文
52 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Versus1008 2010-10-14
  • 打赏
  • 举报
回复
貌似F1下面要写
Result := Arrayint;
bdmh 2010-10-14
  • 打赏
  • 举报
回复
重复贴

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧