unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ExtDlgs, StdCtrls, ADODB, Grids, DBGrids, ExtCtrls,jpeg, DBCtrls; type TForm1 = class(TForm) DBGrid1: TDBGrid; ADOConnection1: TADOConnection; ADOTable1: TADOTable; selectimage: TButton; savetodb: TButton; OpenPictureDialog1: TOpenPictureDialog; DataSource1: TDataSource; DBNavigator1: TDBNavigator; savetofile: TButton; Label1: TLabel; Label2: TLabel; Button1: TButton; Bevel1: TBevel; B...
floor 和 ceil 是 math unit 里的函数,使用前要先 Uses Math。 trunc 和 round 是 system unit 里的函数,缺省就可以用。 floor 直接往小的取,比如 floor(-123.55)=-124,floor(123.55)=123 trunc 直接切下整数,比如 trunc(-123.55)=-123, floor(123.55)=123 ceil 直接往大的取,比如 ceil(-123.55)=-123, ceil(123.55)=124 round 计算四舍五入,比如 round(-123.55)=-124,round(123.55)=124...