1.ç¨delphiå计ç®å¨
2.有delphi的源码源码怎么编译出来?知道的说下,谢谢。源码。源码。源码留言愿望源码
3.Delphi源代码分析简介
ç¨delphiå计ç®å¨
è¿æ¯æºä»£ç ï¼
unit Unit1;
interface
uses
Windows,源码 Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
SpeedButton7: TSpeedButton;
SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton: TSpeedButton;
StaticText1: TStaticText;
SpeedButton0: TSpeedButton;
SpeedButton: TSpeedButton;
SpeedButton: TSpeedButton;
GroupBox1: TGroupBox;
procedure SpeedButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SpeedButtonClick(Sender: TObject);
procedure SpeedButtonClick(Sender: TObject);
procedure SpeedButtonClick(Sender: TObject);
procedure SpeedButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
restart: Boolean;
isfirst: Boolean;
fir_num,sec_num: String;
sign: integer;
result: real;
save: String;
implementation
{ $R *.dfm}
function count(sign: integer):real;
begin
case sign of
1: result:=strtofloat(fir_num)+strtofloat(sec_num); //为å å·æ¶
2: result:=strtofloat(fir_num)-strtofloat(sec_num); //为åå·æ¶
3: result:=strtofloat(fir_num)*strtofloat(sec_num); //为ä¹å·æ¶
4: begin
try
result:=strtofloat(fir_num)/strtofloat(sec_num); //为é¤å·æ¶
except
ShowMessage('é误!');
form1.close;
end; //é¤æ°ä¸º0æ¶,ååºå¼å¸¸å¤ç
end;
end;
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
var
i: integer;
begin
if restart then //å¦ææ¯éæ°å¼å§è¾å ¥,åæ¸ é¤åæ¥çæä½æ°,并设置isfirst为True
begin
isfirst:=True;
fir_num:='';
sec_num:='';
restart:=False;
end;
if isfirst then //å¦ææ¯ç¬¬ä¸ä¸ªæä½æ°
begin
if (sender as TSpeedButton).Caption='.' then //å¦æè¾å ¥çæ¯å°æ°ç¹
begin
if (strlen(pChar(fir_num))<=0) then //å¦æ第ä¸ä¸ªæä½æ°å¹¶æªè¾å ¥
fir_num:='0.'
else
for i:= 1 to strlen(pChar(fir_num)) do
if fir_num[i]='.' then exit;
//å¦æ第ä¸ä¸ªä¸å·²å«æå°æ°ç¹èåè¾å ¥å°æ°ç¹,åéåº
end;
if (strlen(pChar(fir_num))>0) and (fir_num[1]='0') then //å¦ææé«ä½ä¸º0
begin
if ((sender as TSpeedButton).Caption='.') then
fir_num:='0.'
else
begin
if strlen(pChar(fir_num))>1 then //å¦ææ¯å°æ°,å继ç»è¾å ¥
fir_num:=fir_num+(sender as TSpeedButton).Caption
else
fir_num:=(sender as TSpeedButton).Caption;
//å¦æä¸æ¯å°æ°,åå»ææé«ä½ç0
end;
end
else
fir_num:=fir_num+(sender as TSpeedButton).Caption;
StaticText1.Caption:=fir_num;
end
else
begin
if (sender as TSpeedButton).Caption='.' then //å¦æ第äºä¸ªæä½æ°å¹¶æªè¾å ¥
begin
if (strlen(pChar(sec_num))<=0) then
sec_num:='0.'
else
for i:= 1 to strlen(pChar(sec_num)) do
if sec_num[i]='.' then exit;
//å¦æ第äºä¸ªä¸å·²å«æå°æ°ç¹èåè¾å ¥å°æ°ç¹,åéåº
end;
if (strlen(pChar(sec_num))>0) and (sec_num[1]='0') then //å¦ææé«ä½ä¸º0
begin
if ((sender as TSpeedButton).Caption='.') then
sec_num:='0.'
else
begin
if strlen(pChar(sec_num))>1 then //å¦ææ¯å°æ°,å继ç»è¾å ¥
sec_num:=sec_num+(sender as TSpeedButton).Caption
else
sec_num:=(sender as TSpeedButton).Caption;
//å¦æä¸æ¯å°æ°,åå»ææé«ä½ç0
end;
end
else
sec_num:=sec_num+(sender as TSpeedButton).Caption;
StaticText1.Caption:=sec_num;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
StaticText1.Caption:='0.'; //设置StaticText1åå§æ¾ç¤ºä¸º0.
restart:=False;
Isfirst:=True;
fir_num:='';
sec_num:='';
end;
procedure TForm1.SpeedButtonClick(Sender: TObject);
begin
if (fir_num<>'') and (sec_num<>'') then
//å¦æ两åæä½æ°é½ä¸ä¸ºç©º
begin
result:=count(sign); //è°ç¨å½æ°,è¿å计ç®ç»æ
fir_num:=floattostr(result);
sec_num:='';
StaticText1.Caption:=floattostr(result);
end;
sign:=(sender as TSpeedButton).Tag;
isfirst:=False;
restart:=False;
end;
procedure TForm1.SpeedButtonClick(Sender: TObject);
begin
if (sec_num<>'') then
//å¦æ第äºä¸ªæä½æ°ä¸ä¸ºç©ºåè¿åç»æ
begin
result:=count(sign);
fir_num:='';
fir_num:=fir_num+floattostr(result);
StaticText1.Caption:=floattostr(result);
sec_num:='';
end;
restart:=true;
end;
procedure TForm1.SpeedButtonClick(Sender: TObject);
begin
restart:=True;
fir_num:='';
sec_num:='';
self.StaticText1.Caption:='0.';
end;
procedure TForm1.SpeedButtonClick(Sender: TObject);
begin
Close;
end;
end.
有delphi的源码怎么编译出来?知道的说下,谢谢。源码。源码。源码
首先你的源码机器要安装DELPHI软件。
第一步点开始、源码程序、源码拖拉拽开发技术 源码DELPHI,源码进入DELPHI开发界面。源码
第二步是源码在DELPHI里面选择FILE、OPEN打开你的源码源码。
第三步是锁机支付解锁源码在DELPHI的菜单PROJECT里面选择COMPILE编译,一切顺利就能生成EXE文件。
Delphi源代码分析简介
本书深入剖析了Delphi内核(RTL)的奥秘,从Nico Bendlin编写的经典示例程序MiniDExe开始,以此为起点,讲解Delphi编译器层面的抽签助手小程序源码技术细节。通过逐步解构和分析,读者能深入了解Delphi的核心机制,包括编译器如何在Windows环境中与用户代码、Delphi RTL进行交互。作者详尽地展示了对象结构、龙头妖股源码编写VCL和COM等在源代码中的实现,通过关键代码的列举和系统性分析,揭示了内核的完整构造。
书中详细探讨了Delphi的编译器如何处理模块化、内存管理、线程调度,以及与操作系统资源的协作。初识代码、模块的初始化过程,异常处理机制的底层逻辑,都在作者的剖析下变得清晰可见。这是一本为中高级Delphi开发者量身定制的高级技术读物,它不仅提供了丰富的技术知识,也对Delphi内核的运作机制有深度揭示。
2024-11-18 17:13
2024-11-18 16:51
2024-11-18 16:44
2024-11-18 16:30
2024-11-18 16:14
2024-11-18 15:58
2024-11-18 14:54
2024-11-18 14:53