在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;
在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;