DELPHI中的函数据FUNCTION能否返回数组。(5分)

P

pcmagic

Unregistered / Unconfirmed
GUEST, unregistred user!
如: function test(str:string):array of string;
无法编译。
 
用指针吧,也就是返回一个指向数组的指针。
 
把array of string用Type定义一下即可。
type
TResultArray=array of string;
function test(str:string):TResultArray.
甚至动态数组都可以!
 
agree with Kingron.
 
接受答案了.
 
顶部