Const
arr1: array [0 .. 1, 0 .. 1] of string = (('A0B0', 'A1B0'),
('A0B1', 'A1B1'));
arr2: array [0 .. 2, 0 .. 1] of string = (('X0Y0', 'X1Y0'),
('X2Y0', 'X0Y1'), ('A0', 'B0'));
type
TConstStringList = array [0 .. 0] of String;
PConstStringList = ^TConstStringList;
function Doit(aArray: PConstStringList; AllLen: Integer):string;
var
i: Integer;
s:ansiString;
begin
for i := 0 to AllLen - 1 do
s:=s+aArray[i]+' ';
Result:='"'+Trim(s)+'"';
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
ShowMessage(Doit(@arr1, 4));
end;
数组指针参数
最新推荐文章于 2023-07-18 13:33:13 发布