如何声明并使用下面的函数type
    Point=^node;
    node=record
    data:string;
    link:Point;
end;function SearchPoint(StringForAdd:string):Point;请教各位,上面的东东具体放置的位置

解决方案 »

  1.   

    pas文件里本身有一个type,把这个type放那个上边,函数的位置跟声明其他函数一样就可以了
      

  2.   

    这样就可以了
     type  TForm1 = class(TForm)
        Button1: TButton;  private
        function SearchPoint(StringForAdd:string):TPoint;
        { Private declarations }
      public  end;
       type
        Point=^node;
        node=record
        data:string;
        link:Point;
     end;
      

  3.   

    把function SearchPoint(StringForAdd:string):Point;声明放在type和end之间;再把function SearchPoint(StringForAdd:string):Point;的实现部分放到implementation和{$....}之间给分吧
      

  4.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type  TForm1 = class(TForm)
      private
          function SearchPoint(StringForAdd:string):TPoint;
        { Private declarations }
      public  end;
       type
        Point=^node;
        node=record
        data:string;
        link:Point; end;var
      Form1: TForm1;implementation{$R *.dfm}{ TForm1 }function TForm1.SearchPoint(StringForAdd: string): TPoint;
    beginend;end.
      

  5.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
        function SearchPoint(StringForAdd:string):TPoint;
      public
        { Public declarations }
      end;
      type
        Point=^node;
        node=record
        data:string;
        link:Point;
      end;var
      Form1: TForm1;implementation{$R *.dfm}function TForm1.SearchPoint(StringForAdd: string): TPoint;
    beginend;end.
      这样就可以了哈,你要实现其他功能就自己添加了哈