打印本文 打印本文 关闭窗口 关闭窗口
在Delphi中使用指针参数
作者:武汉SEO闵涛  文章来源:敏韬网  点击数696  更新时间:2009/4/23 18:34:39  文章录入:mintao  责任编辑:mintao

在c语言中用function (int ^par)很方便,查过好多资料没找到Delphi的用法,
今晚没事突然想起用Delphi万能指针Pointer(无类型指针)应该可以代替。测试一下通过。
procedure xx(a:pchar);
var
  tm:^TAdodataset;
begin
  tm:=Pointer(a);
...
end;

procedure bb;
var
  tm:TAdodataset;
begin
  tm...
  xx(@tm);
end;

打印本文 打印本文 关闭窗口 关闭窗口