Вверх ↑
Ответов: 3349
Рейтинг: 233
#1: 2010-08-27 09:14:27 ЛС | профиль | цитата
Test 0.01
------------ Дoбавленo в 09.14:

Add(InlineCode,10375923,490,469)
{
WorkPoints=#6:doTest|
EventPoints=#6:onTest|
DataPoints=#3:str|4:mask|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|22: _str,_mask:string;|9: public|30: str,mask,onTest:THI_Event;|44: procedure doTest(var dt:Tdata;Ind:Word);|5: end;|0:|14:implementation|0:|29:procedure THiAsmClass.doTest;|3:var|16: i,k:integer;|17: s,m,o:string;|16: a,r:boolean;|6: begin|28: _str:=ReadString(dt, str);|30: _mask:=ReadString(dt, mask);|79: if not Length(_str) <= Length(_mask) then _str:=Copy(_str, 1, Length(_mask));|29: for i:=1 to Length(_str) do|9: begin|14: r:=false;|16: s:=_str[i];|17: m:=_mask[i];|17: case m[1] of|59: '#':if s[1] in ['0'..'9'] then a:=true else a:=false;|133: '?':if (s[1] in ['a'..'z']) or (s[1] in ['а'..'я']) or (s[1] in ['A'..'Z']) or (s[1] in ['А'..'Я']) then a:=true else a:=false;|20: '*':a := true;|46: else begin insert(m,o,i); r:=true; end;|9: end;|39: if a and not r then insert(s,o,i);|14: r:=false;|6: end;|25: _hi_OnEvent(onTest, o);|0:|5: end;|0:|4:end.|
link(onTest,2252896:doText2,[(542,475)(542,517)(429,517)(429,482)])
link(str,2252896:Text,[(496,457)(478,457)(478,511)(447,511)])
link(mask,6100898:Value,[])
}
Add(Edit,2252896,441,469)
{
Left=95
Top=50
Width=95
link(onChange,10375923:doTest,[])
}
Add(Memory,6100898,497,406)
{
Default=String(***###???HelloWorld)
}

карма: 1

0