Delphi的函数及过程且参数返回数据

function myset(x:Integer;out y:Integer):Integer;stdcall; // 函数
begin
       y:=x+1;
       Result:=0;
end;

procedure myset1(x:Integer;out y:Integer);stdcall;    //过程
begin
       y:=x+1;
end;

procedure TForm1.FormCreate(Sender: TObject);
      var y:Integer;
begin
      myset(1,y);
      ShowMessage(IntToStr(y));

      myset1(1,y);
      ShowMessage(IntToStr(y));
end;

 

posted on 2013-06-19 22:57  shellcode  阅读(277)  评论(0编辑  收藏  举报

导航