在Form中定义一个子程序是不是直接在里面加:
Procedure TDM_main.login(user,passwd:string):string;
beginend;
就可以了

解决方案 »

  1.   

    只能是过程或函数中有子过程或子函数.如:
    procedure proc_name(Parameter_list);
      procedure procedure proc_name1(Parameter_list);
        function func_name(parameter_list):return;
        var
          ...
        begin
          ...
        end;
      var
        ...
      begin
        ...
      end;
    var
      ...
    begin
      ...
    end;
      

  2.   

    这里有返回值应该是function而不是procedure
      

  3.   

    不可以直接写:
    function TDM_main.login(user,passwd:String):String;
    var 
     ……
    begin
    ……
    end;
    是不是呀