摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type //晚绑定,也就是动态调用外部函数主要用以下三个命令: //LoadLibrary:获取 DLL //GetProcAd... 阅读全文
posted @ 2007-12-06 22:13 万一 阅读(12994) 评论(35) 推荐(2) 编辑
摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button... 阅读全文
posted @ 2007-12-06 21:37 万一 阅读(13806) 评论(53) 推荐(3) 编辑
摘要: 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... 阅读全文
posted @ 2007-12-06 18:22 万一 阅读(2916) 评论(3) 推荐(0) 编辑
摘要: //带默认值的参数只能在后面 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)... 阅读全文
posted @ 2007-12-06 17:23 万一 阅读(4773) 评论(3) 推荐(0) 编辑