可以,你试试这个
type
  TArray = array of string;
function  AAA(const  str:  string): TArray;

解决方案 »

  1.   

    这样不行,为什么不这样呢?
    function  AAA(const  str:  string;var xx: array  of  string):integer;
    把要传递的数值通过xx传出来吧。
      

  2.   

    type
      TStringDynArray = array of String;function AAA(const str: string): array of string;或者直接引用Types单元,Types里就有TStringDynArray的声明
      

  3.   

    错了
    function  AAA(const  str:  string):  TStringDynArray;
      

  4.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls;
    type
      TArr=Array of Integer;type
      TForm1 = class(TForm)
        Button1: TButton;
        Edit1: TEdit;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}
    function GetResult(ii:Integer):TArr;
    var jj: Integer;
        arr: TArr;
    begin
      SetLength(arr,ii);
      for jj := 0 to ii -1 do
        arr[jj] := (jj+1)*100;
      Result := arr;
    end;procedure TForm1.Button1Click(Sender: TObject);
    var ii:Integer;
        arr:TArr;
    begin
      ii := StrToInt(Edit1.Text);
      arr := GetResult(ii);
      for ii := 1 to High(arr)-Low(arr)+1 do
      begin
        Canvas.TextOut(10,ii*15,IntToStr(arr[ii-1]));
      end;
    end;end.