<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Program/Delphi | Hessian's Blog</title><link>https://hessian.cn/cat/program/delphi</link><description>Hessian 的技术笔记：Linux、C++、网络与嵌入式</description><language>zh-CN</language><atom:link href="https://hessian.cn/cat/program/delphi/index.xml" rel="self" type="application/rss+xml"/><item><title>Delphi数据库编程技巧</title><link>https://hessian.cn/p/603.html</link><pubDate>Wed, 18 Apr 2007 03:08:00 +0800</pubDate><guid>https://hessian.cn/p/603.html</guid><description>　我原来在万千的新闻组(news://news.webking.com.cn/)Delphi版上闲逛那段时间，发现经常有人提出一些数据库方面的技巧性问题，问题其实不难，但是要一个简单的解决方案，可能也破费思量，特别在此简单谈谈：&#10;</description></item><item><title>全力提升 TIniFile 的读取速度</title><link>https://hessian.cn/p/656.html</link><pubDate>Mon, 09 Apr 2007 22:48:00 +0800</pubDate><guid>https://hessian.cn/p/656.html</guid><description> 全力提升 TIniFile 的读取速度&#10;软件保存设置一般是写入本地目录，或者写入注册表。前者使用的文件格式很多，多为 IniFile (现在 XML 也开始流行)。后者是将信息储存在注册表中，并通过的 TRegistry 或者标准的 WindowsAPI 来读写。后者有个很大的好处：不需要对多用户系统进行考虑，Windows 可以很好的控制多用户的切换。但缺点是往往卸载软件不将注册表中生成的记录信息删除干净。而制作绿色软件的作者多采用 IniFile 方式保存信息。&#10;</description></item><item><title>【转】浅谈Object Pascal的指针</title><link>https://hessian.cn/p/621.html</link><pubDate>Sat, 07 Apr 2007 16:23:00 +0800</pubDate><guid>https://hessian.cn/p/621.html</guid><description>大家都认为，C语言之所以强大，以及其自由性，很大部分体现在其灵活的指针运用上。因此，说 指针是C语言的灵魂，一点都不为过。同时，这种说法也让很多人 产生误解，似乎只有C语言的指针才能算指针。Basic不支持指针，在此不论。其实，Pascal语言本身也是支持指针的。从最初的Pascal发展至今 的Object Pascal，可以说在指针运用上，丝毫不会逊色于C语言的指针。</description></item><item><title>类的定义和使用</title><link>https://hessian.cn/p/447.html</link><pubDate>Sat, 07 Apr 2007 15:08:00 +0800</pubDate><guid>https://hessian.cn/p/447.html</guid><description>转自:http://mrmzy.bokee.com/tb.b?diaryId=15467469&#10;unit Unit1;&#10;interface&#10;uses&#10;Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,&#10;Dialogs, StdCtrls;&#10;type&#10;TForm1 = class(TForm)&#10;    Label1: TLabel;&#10;    Label2: TLabel;&#10;    Label3: TLabel;&#10;    Label4: TLabel;&#10;    Edit1: TEdit;&#10;    Edit2: TEdit;&#10;    Edit3: TEdit;&#10;    Edit4: TEdit;&#10;    Label5: TLabel;&#10;    Edit5: TEdit;&#10;    Button1: TButton;&#10;    Button2: TButton;&#10;    Button3: TButton;&#10;    Label6: TLabel;&#10;    Label7: TLabel;&#10;    procedure Button1Click(Sender: TObject);&#10;    procedure Button2Click(Sender: TObject);&#10;    procedure Button3Click(Sender: TObject);&#10;private&#10;    { Private declarations }&#10;public&#10;    { Public declarations }&#10;end;&#10;var&#10;Form1: TForm1;&#10;type&#10;    Tstudent=class&#10;    private&#10;      name:string;&#10;      yy:real;&#10;      math:real;&#10;      hx:real;&#10;      total:real;&#10;    public&#10;      procedure getname(nm:string);virtual;&#10;      procedure getyy(cj:real);virtual;&#10;      procedure getmt(cj:real);virtual;&#10;      procedure gethx(cj:real);virtual;&#10;      procedure caculat();virtual;&#10;      function returntotal():real;virtual;&#10;end;&#10;implementation&#10;function Tstudent.returntotal():real;&#10;begin&#10;returntotal:=total;&#10;end;&#10;procedure Tstudent.getname(nm:string);&#10;begin&#10;if name&lt;&gt;nm then&#10;    name:=nm;&#10;end;&#10;procedure Tstudent.getyy(cj:real);&#10;begin&#10;if yy&lt;&gt;cj then&#10;    yy:=cj;&#10;end;&#10;procedure Tstudent.getmt(cj:real);&#10;begin&#10;if math&lt;&gt;cj then&#10;    math:=cj;&#10;end;&#10;procedure Tstudent.gethx(cj:real);&#10;begin&#10;if hx&lt;&gt;cj then&#10;    hx:=cj;&#10;end;&#10;procedure Tstudent.caculat();&#10;begin&#10;total:=yy+math+hx;&#10;end;&#10;{$R *.dfm}&#10;procedure TForm1.Button1Click(Sender: TObject);&#10;var&#10;student:Tstudent;&#10;begin&#10;if (edit1.Text=”) or (edit2.Text=”) or (edit3.Text=”) or (edit4.Text=”) then&#10;     edit5.Text:=’请检查输入！’&#10;else&#10;     begin&#10;       student:=Tstudent.Create;&#10;       student.getname(edit1.Text);&#10;       student.getyy(strtofloat(edit2.Text));&#10;       student.getmt(strtofloat(edit3.Text));&#10;       student.gethx(strtofloat(edit4.Text));&#10;       student.caculat();&#10;       edit5.Text:=floattostr(student.returntotal());&#10;     end&#10;end;&#10;procedure TForm1.Button2Click(Sender: TObject);&#10;begin&#10;edit1.Text:=”;&#10;edit2.Text:=”;&#10;edit3.Text:=”;&#10;edit4.Text:=”;&#10;edit5.Text:=”;&#10;end;&#10;procedure TForm1.Button3Click(Sender: TObject);&#10;begin&#10;close;&#10;end;&#10;end.&#10;</description></item></channel></rss>