# 大家能不能贴个例子啊!急求大家!

Sunniness 2004-04-30 03:31:14

...全文
33 7 点赞 打赏 收藏 举报

7 条回复

xdf221 2004-04-30
var
Arr: array of array of string;
I, J: Integer;
begin
// 生成3行4列的二维数组
SetLength(Arr, 3, 4);
for I := 0 to 4 do
for J := 0 to 6 do
Arr[I, J] := inttostr(I + J);
end;
• 打赏
• 举报

jacky_shen 2004-04-30
var
MyArr: array of array of Integer;
I, J: Integer;
begin
// 生成3行4列的二维数组
SetLength(MyArr, 3, 4);
for I := 0 to 2 do
for J := 0 to 3 do
MyArr[I, J] := I * J;
end;
• 打赏
• 举报

jinjazz 2004-04-30
var buffer :array of array of char;
s:string;
begin
getmem(buffer,100);
getmem(buffer[0],10);
getmem(buffer[1],10);
s:=edit1.Text;
copymemory(@buffer[0,0],@S[1],10);
showmessage(buffer[0,0]);

FreeMem(buffer[0]);
FreeMem(buffer[1]);
freemem(buffer);
• 打赏
• 举报

Sunniness 2004-04-30

• 打赏
• 举报

jinjazz 2004-04-30

procedure TForm1.Button1Click(Sender: TObject);
var buffer :array of char;
s:string;
begin
getmem(buffer,10);
buffer[1]:='a';
s:=edit1.Text;
copymemory(@buffer[0],@S[1],10);
showmessage(buffer[4]);
FreeMem(buffer);
end;
• 打赏
• 举报

wanwangzhiwang 2004-04-30
var
I:integer;
Arr:array of integer;
begin
For I:=1 to 10 do
begin
SetLength(Arr,I);
Arr[I-1] := I;
end;
end;
• 打赏
• 举报

jinjazz 2004-04-30
procedure TForm1.Button1Click(Sender: TObject);
var buffer :array of char;
begin
getmem(buffer,2);
buffer[1]:='a';
showmessage(buffer[1]);
FreeMem(buffer);
end;
• 打赏
• 举报

Delphi

4965

Delphi 开发及应用

2004-04-30 03:31