nesco писал(а):
А не быстрее было бы искать прямо в тексте, никуда его не загружая Это через SearchInFile?
Add(MainForm,2953706,21,105)
{
Width=313
Height=222
link(onCreate,3389893:doSave,[])
}
Add(SearchInFile,14037412,196,252)
{
FileName="SIF.txt"
link(onSearch,9300043:doCompare,[])
link(Text,8549512:Var2,[])
}
Add(Edit,4029089,203,196)
{
Left=15
Top=15
Width=270
Text="123"
}
Add(StrList,3389893,119,84)
{
FileName="SIF.txt"
Strings=#3:123|3:321|6:123123|3:321|3:456|
}
Add(Button,12509312,126,252)
{
Left=15
Top=45
Caption="Search"
link(onClick,14037412:doSearch,[])
}
Add(Memo,7358780,322,259)
{
Left=15
Top=75
Width=270
ScrollBars=2
}
Add(If_else,9300043,252,259)
{
link(onTrue,7358780:doAdd,[])
link(Op2,8549512:Var3,[(265,243)])
}
Add(GetDataEx,8549512,203,238)
{
link(Data,4029089:Text,[])
}
Да, скорость значительно быстрей.
Add(MainForm,2953706,14,105)
{
Width=306
Height=474
link(onCreate,10876761:doFor,[])
}
Add(SearchInFile,14037412,196,252)
{
FileName="SIF.txt"
Point(onEnd)
Point(NumStr)
link(onSearch,9300043:doCompare,[])
link(Text,8549512:Var2,[])
link(onEnd,603773:doStop,[(240,272)(240,268)(79,268)(79,265)])
}
Add(Edit,4029089,189,168)
{
Left=15
Top=15
Width=270
Text="123"
}
Add(StrList,3389893,168,84)
{
FileName="SIF.txt"
Strings=#3:123|3:321|6:123123|3:321|3:456|
}
Add(Button,12509312,35,252)
{
Left=15
Top=45
Caption="Search"
link(onClick,603773:doStart,[])
}
Add(Memo,7358780,385,259)
{
Left=15
Top=80
Width=270
ScrollBars=2
link(Str,14037412:NumStr,[(391,247)(297,247)(297,296)(202,296)])
}
Add(If_else,9300043,252,259)
{
link(onTrue,7358780:doAdd,[])
link(Op2,829905:Var2,[])
}
Add(GetDataEx,8549512,203,238)
{
link(Data,4029089:Text,[(209,219)(195,219)])
}
Add(TimeCounter,603773,91,252)
{
link(onStart,9910596:doEvent1,[])
link(onStop,10268:doText,[(209,265)(209,314)])
}
Add(Label,10268,252,308)
{
Left=76
Top=46
}
Add(For,10876761,70,119)
{
End=200000
link(onEvent,3389893:doAdd,[(135,125)(135,90)])
link(onStop,3389893:doSave,[(135,132)(135,125)])
}
Add(Memory,1115968,259,210)
{
Point(Data)
link(Data,8549512:Var3,[(265,198)(239,198)(239,243)])
}
Add(Hub,9910596,140,252)
{
link(onEvent1,15373729:doWork2,[(206,258)(206,216)])
link(onEvent2,14037412:doSearch,[(175,265)(175,258)])
}
Add(Button,5025775,42,462)
{
Left=15
Top=320
Caption="Search"
link(onClick,2408488:doStart,[])
}
Add(TimeCounter,2408488,98,462)
{
link(onStart,6970297:doEvent1,[])
link(onStop,10189651:doText,[(156,475)(156,524)])
}
Add(Hub,6970297,147,462)
{
link(onEvent1,15373729:doWork3,[(167,468)(167,219)])
link(onEvent2,3008004:doEnum,[(171,475)(171,468)])
}
Add(ArrayEnum,3008004,182,462)
{
link(onItem,14401021:doCompare,[])
link(onEndEnum,2408488:doStop,[(226,475)(226,565)(86,565)(86,475)])
link(Array,3389893:Array,[])
}
Add(Memo,8927946,287,462)
{
Left=75
Top=320
Width=210
Height=110
link(Str,3008004:Index,[(293,450)(272,450)(272,506)(195,506)])
}
Add(If_else,14401021,231,462)
{
link(onTrue,8927946:doAdd,[])
link(Op2,829905:Var1,[(244,250)])
}
Add(GetDataEx,829905,259,245)
{
link(Data,1115968:Value,[])
}
Add(HubEx,15373729,217,210)
{
link(onEvent,1115968:doValue,[])
}
Add(Label,10189651,182,518)
{
Left=17
Top=342
}