摘要:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type //晚绑定,也就是动态调用外部函数主要用以下三个命令: //LoadLibrary:获取 DLL //GetProcAd... 阅读全文
摘要:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button... 阅读全文
摘要:
procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin i := 0; ShowMessage(IntToStr(i)); //0 i := not i; ShowMessage(IntToStr(i)); //-1 i := not i; ShowMessage(IntToStr... 阅读全文
摘要:
//带默认值的参数只能在后面 function MyFun(a:Integer; b:Integer=1; c:Integer=2): Integer; begin Result := a + b + c; end; procedure TForm1.Button1Click(Sender: TObject); var x: Integer; begin x := MyFun(1)... 阅读全文