unit Unit1;

 

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

type
  T2DAry = array of array of string;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function MyFunction(arr: T2DAry): boolean;
var
  i, j: Integer;
begin
  for i:=low(arr)  to high(arr) do
    for j := low(arr[i]) to high(arr[i]) do
    begin
      ShowMessage('arr['+IntToStr(i)+']['+IntToStr(j)+']='+arr[i][j]);
    end;
end;

{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
  arr_Para: T2DAry;
begin
  SetLength(arr_Para, 2, 2);
  arr_Para[0][0] := 's00';
  arr_Para[0][1] := 's01';
  arr_Para[1][0] := 's10';
  arr_Para[1][1] := 's11';
  MyFunction(arr_Para);
end;

end.

 

posted on 2010-11-19 09:26  sunjun0427  阅读(2776)  评论(0编辑  收藏  举报