Add(MainForm,4322833,217,217)
{
Width=403
Height=305
}
Add(Edit,16486014,266,217)
{
Left=55
Width=335
Text="ВВВАААССС"
}
Add(Button,12914289,217,266)
{
link(onClick,892564:doData,[])
}
Add(DoData,892564,266,266)
{
link(onEventData,6389307:doConvert,[])
link(Data,16486014:Text,[])
}
Add(RichEdit,14252179,390,266)
{
Top=20
Width=390
Height=250
ScrollBars=2
}
Add(InlineCode,6389307,322,266)
{
WorkPoints=#38:doConvert=Входящая не разбитая строка |
EventPoints=#34:onResult=Выходящая разбитая строка|
DataPoints=#4:Data|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|9: public|3: |18: Data:THI_Event;|22: onResult:THI_Event;|3: |62: procedure doConvert(var _Data:TData; Index:word);//StrToTri|5: end;|0:|14:implementation|71:procedure THiAsmClass.doConvert(var _Data:TData; Index:word);//StrToTri|17:var i: Integer;|23: m,f,s,str:string;|5:begin|33: str := ReadString(_Data,Data);|24: Replace(str, ' ','');|11: m := '';|11: f := '';|3:TRY|25: if str = '' then exit;|31: if (str[1] = '-') then begin|22: Delete(str,1,1);|29: if (str = '') then exit|21: else m := '- ';|8: end; |12: s := str;|27: for i:=1 to Length(s) do|30: if s[i] = '.' then begin|30: str := GetTok(s,'.');|22: f := '.' + s;|15: break;|10: end;|24: i := Length(str) - 2;|24: while i >= 2 do begin|48: if (str[1] = '-') and (i < 3) then break; |26: Insert(' ', str, i);|15: Dec(i,3);|7: end;|7:FINALLY|49: _hi_CreateEvent(_Data,@onResult, m + str + f);|4:END;|4:end;|4:end.|
link(onResult,14252179:doAdd,[])
}
Префиксы _work_, _event_, _data_, _var_ в классе THiAsmClass не нужны