Вверх ↑
Ответов: 1327
Рейтинг: 30
#1: 2021-09-01 17:25:05 ЛС | профиль | цитата
как то так, мб есть варианты к оптимизации?

Add(MainForm,2953706,112,203)
{
Width=460
Height=435
}
Add(Memo,12034018,406,273)
{
Left=220
Top=10
Width=210
Height=155
ScrollBars=2
}
Add(ArrayEnum,8696675,217,217)
{
link(onItem,4210017:doSplit,[])
link(onEndEnum,363569:doPHend,[(272,230)(272,286)])
link(Array,15543141:Array,[])
}
Add(InlineCode,363569,294,273)
{
@Color=170
WorkPoints=#4:doPH|7:doPHend|
EventPoints=#4:onPH|
DataPoints=#3:adr|4:size|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses Windows,Share,Debug,kol;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|27: onPH,adr,size:THI_Event;|49: procedure doPH(var _Data:TData; Index:word);|52: procedure doPHend(var _Data:TData; Index:word);|46: procedure doShort1(sta:Int64; fin:Int64);|5: end;|0:|0:|14:implementation|0:|3:var|12:start:Int64;|13:finaly:Int64;|18:d1,d2,d3,d4:Int64;|13:indx:integer;|0:|0:|31:procedure THiAsmClass.doShort1;|0:|5:begin|0:|0:|22:if indx > 0 then begin|8:d1:=sta;|8:d2:=fin;|0:|23:if (d1-d4)>1 then begin|0:|60:_hi_onEvent(onPH, double2str(d3) + '-' + double2str(d4-d3));|7:d3:=d1;|8:d4:=d2; |30:end else if d4<d2 then d4:=d2;|0:|0:|14:end else begin|8:d3:=sta;|8:d4:=fin;|0:|4:end;|0:|13:indx:=indx+1;|0:|4:end;|0:|0:|30:procedure THiAsmClass.doPHend;|0:|5:begin|60:_hi_onEvent(onPH, double2str(d3) + '-' + double2str(d4-d3));|8:indx:=0;|6:d1:=0;|6:d2:=0;|6:d3:=0;|6:d4:=0;|4:end;|0:|27:procedure THiAsmClass.doPH;|0:|5:begin|35:start:=Trunc(ReadReal(_data, adr));|39:finaly:=start+ReadInteger(_data, size);|0:|0:|0:|23:doShort1(start,finaly);|0:|0:|0:|4:end;|0:|0:|4:end.|
link(onPH,12034018:doAdd,[])
link(adr,4210017:Part1,[])
link(size,4210017:Part2,[])
}
Add(MultiStrPart,4210017,294,217)
{
Char="-"
link(onSplit,363569:doPH,[(336,223)(336,317)(282,317)(282,279)])
}
Add(Button,8468548,119,266)
{
Left=60
Top=180
link(onClick,10083982:doEvent1,[])
}
Add(Hub,10083982,168,266)
{
link(onEvent1,12034018:doClear,[(252,272)(252,331)(346,331)(346,286)])
link(onEvent2,8696675:doEnum,[(200,279)(200,223)])
}
Add(Memo,15543141,203,147)
{
Left=10
Top=10
Width=205
Height=155
Strings=#21:140714554880000-32768|20:140714554912768-8192|22:140714554920960-421888|20:140714555342848-4096|22:140714555346944-413696|22:140714555760640-159744|21:140714555920384-16384|21:140714555936768-40960|20:140714556719104-4096|22:140714556723200-516096|
ScrollBars=2
}
Add(Button,9551345,77,490)
{
Left=65
Top=370
Caption="Сut >>"
link(onClick,13467277:doEvent1,[])
}
Add(Memo,4480328,175,413)
{
Left=10
Top=210
Width=210
Height=145
Strings=#15:554880000-32768|14:554912768-8192|16:554920960-421888|14:555342848-4096|16:555346944-413696|16:555760640-159744|15:555920384-16384|15:555936768-40960|14:556719104-4096|16:556723200-516096|
ScrollBars=2
}
Add(Memo,4741751,945,658)
{
Left=245
Top=210
Width=185
Height=145
ScrollBars=2
}
Add(ArrayEnum,14243239,189,490)
{
link(onItem,9998459:doSplit,[(240,496)(240,461)])
link(onEndEnum,12494716:doWork1,[(445,503)(445,566)(585,566)])
link(Array,4480328:Array,[])
}
Add(MultiStrPart,6180948,462,490)
{
Char="-"
link(onSplit,12953303:doCompare,[])
}
Add(If_else,12953303,504,490)
{
Type=2
Op2=Integer(0)
link(onTrue,9780510:doConvert,[(543,496)(543,552)(375,552)(375,580)])
link(onFalse,15628509:doEvent1,[])
link(Op1,14243239:Index,[(510,468)(450,468)(450,530)(202,530)])
}
Add(Convertor,9780510,385,574)
{
Mode=1
link(onResult,5452976:doValue,[])
link(Data,1599555:Var2,[(391,558)(468,558)])
}
Add(Convertor,2047033,469,574)
{
Mode=1
link(onResult,15550595:doValue,[])
link(Data,9385286:Var2,[])
}
Add(Memory,5452976,427,574)
{
link(onData,2047033:doConvert,[])
}
Add(Memory,15550595,518,574)
{
link(onData,14706288:doCalc,[(557,580)(557,615)(417,615)(417,664)])
}
Add(Memory,4786279,630,560)
{
}
Add(Memory,13084587,686,560)
{
}
Add(GetDataEx,1599555,462,532)
{
link(Data,6180948:Part1,[])
}
Add(GetDataEx,9385286,469,539)
{
link(Data,6180948:Part2,[])
}
Add(Hub,15628509,553,497)
{
link(onEvent1,4492612:doConvert,[])
link(onEvent2,3641227:doConvert,[])
}
Add(Convertor,4492612,581,497)
{
Mode=1
link(onResult,3475591:doWork1,[(620,503)])
link(Data,1599555:Var3,[(587,488)(573,488)(573,537)])
}
Add(Convertor,3641227,637,504)
{
Mode=1
link(onResult,11367528:doWork1,[(676,510)])
link(Data,9385286:Var3,[(643,495)(629,495)(629,544)])
}
Add(If_else,47168,476,658)
{
Op2=Integer(1)
link(onTrue,16042642:doEvent1,[])
link(onFalse,164229:doCompare,[(515,671)(515,699)(445,699)(445,727)])
}
Add(MathParse,14706288,427,658)
{
MathStr="(%1 - %2)>1"
link(onResult,47168:doCompare,[])
link(X1,8115242:Var2,[])
link(X2,5750854:Var1,[(440,635)])
}
Add(Hub,16042642,532,658)
{
OutCount=3
link(onEvent1,12494716:doWork2,[])
link(onEvent2,11559034:doData,[])
link(onEvent3,11088632:doData,[])
}
Add(FormatStr,1540418,693,658)
{
Mask="%1-%2"
link(onFString,10202400:doSplit,[])
link(Str1,4786279:Value,[(699,649)(636,649)])
link(Str2,10415302:Var3,[(706,635)])
}
Add(GetDataEx,10415302,686,630)
{
link(Data,13084587:Value,[])
}
Add(DoData,11559034,560,665)
{
link(onEventData,3475591:doWork2,[(599,671)(599,566)])
link(Data,8115242:Var3,[(566,628)])
}
Add(DoData,11088632,609,672)
{
link(onEventData,15754407:doWork2,[])
link(Data,16588306:Var3,[(615,621)])
}
Add(HubEx,3475591,616,560)
{
link(onEvent,4786279:doValue,[])
}
Add(HubEx,11367528,672,560)
{
link(onEvent,13084587:doValue,[])
}
Add(GetDataEx,8115242,427,623)
{
link(Data,5452976:Value,[])
}
Add(If_else,164229,455,721)
{
Type=1
link(onTrue,13327232:doData,[])
link(Op1,5750854:Var2,[])
link(Op2,16588306:Var1,[(468,621)])
}
Add(GetDataEx,16588306,518,616)
{
link(Data,15550595:Value,[])
}
Add(GetDataEx,5750854,455,630)
{
Angle=1
link(Data,10415302:Var1,[])
}
Add(DoData,13327232,518,721)
{
link(onEventData,15754407:doWork3,[(676,727)])
link(Data,16588306:Var2,[])
}
Add(HubEx,15754407,672,672)
{
Angle=3
link(onEvent,11367528:doWork3,[])
}
Add(HubEx,12494716,581,658)
{
link(onEvent,1540418:doString,[])
}
Add(MultiStrPart,9998459,259,455)
{
Char="-"
link(onSplit,2986045:doOperation,[(303,461)(303,489)(254,489)(254,517)])
}
Add(FormatStr,5967149,259,553)
{
Mask="%1-%2"
link(onFString,6180948:doSplit,[(377,559)(377,496)])
link(Str1,2150765:Var2,[])
link(Str2,2986045:Result,[])
}
Add(Math,2986045,266,511)
{
link(onResult,5967149:doString,[(310,517)(310,538)(247,538)(247,559)])
link(Op1,2150765:Var3,[(272,495)])
link(Op2,9998459:Part2,[(279,499)(272,499)])
}
Add(GetDataEx,2150765,259,490)
{
link(Data,9998459:Part1,[])
}
Add(MultiStrPart,10202400,840,658)
{
Char="-"
link(onSplit,11531637:doOperation,[(884,664)(884,692)(835,692)(835,720)])
}
Add(FormatStr,5994216,840,756)
{
Mask="%1-%2"
link(onFString,4741751:doAdd,[(908,762)(908,664)])
link(Str1,6996588:Var2,[])
link(Str2,11531637:Result,[])
}
Add(Math,11531637,847,714)
{
OpType=1
link(onResult,5994216:doString,[(891,720)(891,741)(828,741)(828,762)])
link(Op1,10202400:Part2,[])
link(Op2,6996588:Var3,[(860,698)])
}
Add(GetDataEx,6996588,840,693)
{
link(Data,10202400:Part1,[])
}
Add(Hub,13467277,126,490)
{
link(onEvent1,4741751:doClear,[(155,496)(155,671)])
link(onEvent2,14243239:doEnum,[(164,503)(164,496)])
}
карма: 2

0
Редактировалось 1 раз(а), последний 2021-09-01 17:33:53