unit1.pas
来自「发射台 控制台 dephi编写 大家可以随便可看看, 可以做dephi入门实例」· PAS 代码 · 共 54 行
PAS
54 行
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Button1: TButton;
Edit6: TEdit;
Edit7: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
re, i : integer;
n : array[0..5] of integer;
begin
n[0] := StrToInt(self.Edit1.Text);
n[1] := StrToInt(self.Edit2.Text);
n[2] := StrToInt(self.Edit3.Text);
n[3] := StrToInt(self.Edit4.Text);
n[4] := StrToInt(self.Edit5.Text);
n[5] := StrToInt(self.Edit5.Text);
re := 0;
for i :=0 to 5 do
begin
re := re or n[i];
end;
self.Edit7.Text := IntToStr(re)
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?