Вверх ↑
Ответов: 8921
Рейтинг: 823
#1: 2017-05-26 00:57:01 ЛС | профиль | цитата
sla8a писал(а):
придут товарищи с секундомерами

Здесь мы, здесь
IC без секундомера


Add(MainForm,2953706,350,77)
{
link(onCreate,5754919:doWork2,[])
}
Add(InlineCode,9695677,567,154)
{
WorkPoints=#7:doStart|6:doCalc|
EventPoints=#4:onIs|4:onNo|
VarPoints=#
DataPoints=#
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses kol,Share,Windows,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|0:|10: private|26: _Arr: Array of string;|19: _Numb: integer;|9: public|25: _data_Data:THI_Event;|20: onIs:THI_Event; |19: onNo:THI_Event;|4: |52: procedure doStart(var _Data:TData; Index:word); |51: procedure doCalc(var _Data:TData; Index:word); |5: end;|38: |21: |14:implementation|0:|2: |29:procedure THiAsmClass.doCalc;|16:var i,j:integer;|27: ss:string; |5:begin|23: ss:=ToString(_Data);|8: j:=0;|24: for i:=0 to _Numb do|10: begin|25: if ss=_Arr[i] then|13: begin|31: _hi_onEvent(onIs, ss);|14: j:=1;|15: break;|12: end;|9: end;|40: if j=0 then _hi_onEvent(onNo, ss); |4:end;|0:|30:procedure THiAsmClass.doStart;|15: var i:integer;|28: ss:string; |5:begin|24: ss:=ToString(_Data);|37: _Numb:= str2int(Parse(ss,'#'))-1;|29: SetLength(_Arr, _Numb+1);|66: for i:=0 to _Numb do _Arr[i]:=Parse(ss,'#'); |4:end;|0:|4:end.|
link(onIs,1499927:doAdd,[(606,160)(606,97)])
link(onNo,113941:doAdd,[])
}
Add(StrList,9007008,455,91)
{
}
Add(Button,13042983,350,196)
{
Left=15
Top=65
Caption="10000"
link(onClick,12861570:doEvent1,[])
}
Add(Replace,494918,511,154)
{
SubStr="\13\10"
DestStr="#"
link(onReplace,9695677:doStart,[])
}
Add(FormatStr,1325957,455,154)
{
Mask="%2#%1"
link(onFString,494918:doReplace,[])
link(Str1,9007008:Text,[])
link(Str2,15904293:Var2,[])
}
Add(For,7194033,448,203)
{
End=9999
link(onEvent,16175481:doWork1,[])
link(onStop,2901245:doEvent1,[(487,216)(487,251)])
}
Add(MultiElement,5390066,399,91)
{
link(onEvent1,9007008:doAdd,[])
link(onEvent2,9007008:doClear,[])
link(onEvent3,1325957:doString,[(445,111)(445,160)])
}
BEGIN_SDK
Add(EditMulti,5544467,21,21)
{
EventCount=3
WorkCount=1
Width=363
Height=137
link(doWork1,8491383:doEvent1,[(39,27)(39,41)])
}
Add(For,12960271,84,56)
{
End=99
link(onEvent,3200883:doFor,[])
link(onStop,5544467:onEvent3,[(123,69)(123,41)])
}
Add(For,3200883,140,56)
{
End=2
link(onEvent,16652732:doRandom,[])
link(onStop,7668263:doEvent1,[(179,69)(179,118)])
}
Add(StrCat,12136332,294,56)
{
Point(doClear)
link(Str1,11288868:Var1,[(300,47)(286,47)(286,96)])
}
Add(Random,16652732,196,56)
{
Min=224
Max=255
link(onRandom,10450224:doConvert,[])
}
Add(Convertor,10450224,238,56)
{
Mode=4
link(onResult,12136332:doStrCat,[])
}
Add(DoData,11942152,294,112)
{
link(onEventData,5544467:onEvent1,[(354,118)(354,27)])
link(Data,11288868:Var2,[])
}
Add(GetDataEx,11288868,294,91)
{
link(Data,12136332:Result,[])
}
Add(Hub,7668263,252,112)
{
link(onEvent1,11942152:doData,[])
link(onEvent2,12136332:doClear,[(277,125)(277,69)])
}
Add(Hub,8491383,49,35)
{
OutCount=3
link(onEvent1,5544467:onEvent2,[(95,41)(95,34)])
link(onEvent2,16652732:doRandomize,[(186,48)(186,69)])
link(onEvent3,12960271:doFor,[(74,55)(74,62)])
}
END_SDK
Add(MultiElement,16175481,511,203)
{
link(onEvent1,9695677:doCalc,[(550,209)(550,167)])
}
BEGIN_SDK
Add(EditMulti,13590876,21,21)
{
EventCount=1
WorkCount=1
link(doWork1,7285298:doFor,[(53,27)(53,55)])
}
Add(StrCat,14447935,217,49)
{
Point(doClear)
link(Str1,6323536:Var1,[(223,40)(209,40)(209,89)])
}
Add(Random,112672,119,49)
{
Min=224
Max=255
link(onRandom,7038619:doConvert,[])
}
Add(Convertor,7038619,161,49)
{
Mode=4
link(onResult,14447935:doStrCat,[])
}
Add(DoData,1245030,217,105)
{
link(onEventData,13590876:onEvent1,[(256,111)(256,27)])
link(Data,6323536:Var2,[])
}
Add(GetDataEx,6323536,217,84)
{
link(Data,14447935:Result,[])
}
Add(Hub,11226280,175,105)
{
link(onEvent1,1245030:doData,[])
link(onEvent2,14447935:doClear,[(200,118)(200,62)])
}
Add(For,7285298,63,49)
{
End=2
link(onEvent,112672:doRandom,[])
link(onStop,11226280:doEvent1,[(109,62)(109,111)])
}
END_SDK
Add(Label,1896650,749,203)
{
Left=135
Top=5
Width=31
Height=17
Caption="Есть!"
}
Add(Label,3720396,749,259)
{
Left=240
Top=5
Width=23
Height=17
Caption="Нет"
}
Add(Memo,15443129,707,196)
{
Left=90
Top=25
Width=100
Height=200
ScrollBars=2
}
Add(Memo,3293135,707,252)
{
Left=220
Top=25
Width=95
Height=200
ScrollBars=2
}
Add(Hub,12861570,406,196)
{
link(onEvent1,3813973:doEvent1,[])
link(onEvent2,7194033:doFor,[])
}
Add(Hub,3813973,581,196)
{
link(onEvent1,1499927:doClear,[(613,202)(613,104)])
link(onEvent2,113941:doClear,[(620,209)(620,174)])
}
Add(StrList,1499927,623,91)
{
}
Add(StrList,113941,644,161)
{
}
Add(DoData,15977997,623,217)
{
link(onEventData,15443129:doText,[])
link(Data,1499927:Text,[])
}
Add(DoData,5717497,644,273)
{
link(onEventData,3293135:doText,[])
link(Data,113941:Text,[])
}
Add(Hub,2901245,567,245)
{
OutCount=3
link(onEvent1,15977997:doData,[(599,251)(599,223)])
link(onEvent2,5717497:doData,[(634,258)(634,279)])
link(onEvent3,5201381:doString,[(592,265)(592,335)])
}
Add(Label,16264451,714,329)
{
Left=5
Top=230
Height=20
}
Add(FormatStr,5201381,665,329)
{
DataCount=4
Mask="Из %1 слов совпало с одним из %2 эталонов %3, не совпало %4"
link(onFString,16264451:doText,[])
link(Str1,7194033:Position,[(671,320)(454,320)])
link(Str2,15904293:Var3,[(678,313)(559,313)(559,145)])
link(Str3,1499927:Count,[(685,152)(636,152)])
link(Str4,113941:Count,[(692,264)(657,264)])
}
Add(GetDataEx,15904293,462,140)
{
link(Data,9007008:Count,[])
}
Add(Button,13195911,350,119)
{
Left=15
Top=15
Caption="Эталон"
link(onClick,5754919:doWork3,[(389,125)])
}
Add(HubEx,5754919,385,91)
{
link(onEvent,5390066:doWork1,[])
}

карма: 19

0