Add(InlineCode,14564783,154,105) { WorkPoints=#11:doOperation| EventPoints=#8:onResult| Code=#15:unit HiAsmUnit;|12:// Autor Tad|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|22: onResult:THI_Event;|54: procedure doOperation(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|41:function Factorial(n: integer): Longint; |3:var|13: i: Integer;|5:begin|14: Result := 1;|20: for i := 2 to n do|25: Result := Result * i;|4:end;|0:|34:procedure THiAsmClass.doOperation;|5:begin|52: _hi_OnEvent(onResult,Factorial(ToInteger(_Data)));|4:end;|0:|4:end.| link(onResult,12819457:doText,[]) } Add(Button,3207415,91,105) { Left=20 Top=55 Data=Integer(5) link(onClick,14564783:doOperation,[]) } Add(Edit,12819457,210,105) { Left=100 Top=55 Width=275 }