Add Pascal learning files
This commit is contained in:
31
PascalABCnet/остальное/Счетчик.pas
Normal file
31
PascalABCnet/остальное/Счетчик.pas
Normal file
@@ -0,0 +1,31 @@
|
||||
program counter;
|
||||
uses FormsABC;
|
||||
var
|
||||
p := new Button('+');
|
||||
f2 := new FlowBreak;
|
||||
x := new IntegerField('kills:');
|
||||
f1 := new FlowBreak(20);
|
||||
m := new Button('-');
|
||||
y:integer;
|
||||
procedure plus;
|
||||
begin
|
||||
inc(y);
|
||||
x.value := y;
|
||||
end;
|
||||
|
||||
procedure minus;
|
||||
begin
|
||||
dec(y);
|
||||
x.Value := y;
|
||||
end;
|
||||
|
||||
begin
|
||||
MainForm.Title := 'Счетчик';
|
||||
MainForm.SetSize(250,200);
|
||||
MainForm.CenterOnScreen;
|
||||
mainPanel.Dock :=DockStyle.right;
|
||||
mainPanel.Width := 170;
|
||||
|
||||
p.Click += plus;
|
||||
m.Click += minus;
|
||||
end.
|
||||
Reference in New Issue
Block a user