ВУЗ:
Составители:
Рубрика:
33
Procedure TInt.Execute;
Var E: TEvent;
Begin
repeat
EndState:= 0;
GetEvent (E);
HandleEvent (E);
until Valid;
End;
Procedure TInt.HandleEvent;
Begin
if Event. what = evMessage then begin
case Event. command of
cmAdd: AddY (Event. A);
…
cmQuit: EndExec;
else exit end;
ClearEvent (Event) end
End;
Function TInt.Valid;
Begin
if EndState = 0 then Valid:= false
else Valid:= true
End;
Procedure TInt.ClearEvent;
Begin
Event. what:= evNothing
End;
Procedure TInt.EndExec;
Begin
EndState:= 1
End;
Procedure TInt.AddY;
Begin
X:= X+Y
End;
33
Procedure TInt.Execute;
Var E: TEvent;
Begin
repeat
EndState:= 0;
GetEvent (E);
HandleEvent (E);
until Valid;
End;
Procedure TInt.HandleEvent;
Begin
if Event. what = evMessage then begin
case Event. command of
cmAdd: AddY (Event. A);
…
cmQuit: EndExec;
else exit end;
ClearEvent (Event) end
End;
Function TInt.Valid;
Begin
if EndState = 0 then Valid:= false
else Valid:= true
End;
Procedure TInt.ClearEvent;
Begin
Event. what:= evNothing
End;
Procedure TInt.EndExec;
Begin
EndState:= 1
End;
Procedure TInt.AddY;
Begin
X:= X+Y
End;
Страницы
- « первая
- ‹ предыдущая
- …
- 30
- 31
- 32
- 33
- 34
- …
- следующая ›
- последняя »
