parent
ca57fd2e13
commit
1f0b624609
BIN
TSLInterp.dll
BIN
TSLInterp.dll
Binary file not shown.
|
|
@ -1255,6 +1255,7 @@ type %s=class(%s)
|
|||
ci := self.classinfo(); //将成员变量赋值为nil避免循环引用
|
||||
for i,v in ci["members"] do
|
||||
begin
|
||||
if v["const"] then continue;
|
||||
if v["static"] then continue;
|
||||
invoke(self,v["name"],nil);
|
||||
end
|
||||
|
|
|
|||
|
|
@ -409,14 +409,19 @@ type tslparser = class(tslparserbase) //
|
|||
end
|
||||
if tk="=" and tp=TT_SYM then
|
||||
begin
|
||||
ctoken(tk,tp,pos);
|
||||
if ifnil(tk) then break;
|
||||
if tp=TT_SYM then
|
||||
i_t := "";
|
||||
while true do
|
||||
begin
|
||||
bpos();
|
||||
continue;
|
||||
ctoken(tk,tp,pos);
|
||||
if ifnil(tk) then break;
|
||||
if tp=TT_SYM and tk=";" then
|
||||
begin
|
||||
bpos();
|
||||
break;
|
||||
end
|
||||
i_t+=tk;
|
||||
end
|
||||
r[rcount]["init"] := tk;
|
||||
r[rcount]["init"] := i_t;
|
||||
continue;
|
||||
end
|
||||
if tk=";" then
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ public //֪ͨ
|
|||
ow := nw;
|
||||
end
|
||||
//if ow<>ac then
|
||||
ow.Notification(ac,Operation);
|
||||
return ow.Notification(ac,Operation);
|
||||
end
|
||||
function Notification(AComponent,Operation);virtual; //通知
|
||||
begin
|
||||
|
|
@ -229,7 +229,7 @@ public //֪ͨ
|
|||
@param(AComponent)(tcomponent) 改变的对象 %%
|
||||
@param(Operation)(member of TOperation) 通知码 %%
|
||||
**}
|
||||
if dosendrenote(AComponent,Operation) then return ;
|
||||
if dosendrenote(AComponent,Operation) then return true;
|
||||
If(Operation=opRemove)then
|
||||
begin
|
||||
RemoveFreeNotification(AComponent);
|
||||
|
|
@ -254,6 +254,15 @@ private
|
|||
return e.skip;
|
||||
end
|
||||
end
|
||||
function doinqurequit();
|
||||
begin
|
||||
if foninqurequit then
|
||||
begin
|
||||
e := new tuieventbase(0,0,0,0);
|
||||
CallMessgeFunction(foninqurequit,self(true),e);
|
||||
return e.skip;
|
||||
end
|
||||
end
|
||||
Procedure SetDesignInstance(Value); //设置设计状态
|
||||
begin
|
||||
If Value then
|
||||
|
|
@ -377,6 +386,19 @@ public //
|
|||
AOwner.InsertComponent(self(true));
|
||||
end
|
||||
end
|
||||
function inqurequit():bool;virtual; //ѯÎÊÍ˳ö
|
||||
begin
|
||||
//·µ»Ø1 ²»Í˳ö
|
||||
//if doinqurequit() then return true;
|
||||
data := FComponents.data();
|
||||
C := length(data)-1;
|
||||
While(C >= 0) do
|
||||
begin
|
||||
if data[c].inqurequit() then return true;
|
||||
c--;
|
||||
end;
|
||||
if doinqurequit() then return true;
|
||||
end
|
||||
function Recycling();override; //回收
|
||||
begin
|
||||
if not FComponentCreated then exit;
|
||||
|
|
@ -689,6 +711,7 @@ public //
|
|||
property Loader read GetLoader; //加载器
|
||||
property ondestroy:eventhandler read fondestroy write fondestroy;
|
||||
property onnotification:eventhandler read fonnotification write fonnotification;
|
||||
property oninqurequit:eventhandler read foninqurequit write foninqurequit;
|
||||
private
|
||||
function dodestroy();virtual;
|
||||
begin
|
||||
|
|
@ -701,4 +724,5 @@ public //
|
|||
end
|
||||
[weakref]fondestroy;
|
||||
[weakref]fonnotification;
|
||||
[weakref]foninqurequit;
|
||||
end
|
||||
|
|
@ -658,7 +658,7 @@ type tcontrol = class(tcomponent)
|
|||
end
|
||||
end
|
||||
public//通知
|
||||
procedure Notification(AComponent:TComponent;Operation:TOperation);override; //֪ͨ
|
||||
function Notification(AComponent:TComponent;Operation:TOperation);override; //֪ͨ
|
||||
begin
|
||||
{**
|
||||
@explan(说明) 通知消息处理 %%
|
||||
|
|
|
|||
|
|
@ -398,28 +398,7 @@ type TCustomMemoCmd=class() //
|
|||
|
||||
)
|
||||
**}
|
||||
static ecNone;
|
||||
static ecViewCommandFirs;
|
||||
static ecViewCommandLast;
|
||||
static ecEditCommandFirs;
|
||||
static ecEditCommandLast;
|
||||
static ecLeft;
|
||||
static ecRight;
|
||||
static ecUp;
|
||||
static ecDown;
|
||||
static ecWordLeft;
|
||||
static ecWordRight;
|
||||
static ecLineStart;
|
||||
static ecLineEnd;
|
||||
static ecPageUp;
|
||||
static ecPageDown;
|
||||
static ecPageLeft;
|
||||
static ecPageRight;
|
||||
static ecPageTop;
|
||||
static ecPageBottom;
|
||||
static ecEditorTop;
|
||||
static ecEditorBottom;
|
||||
static ecGotoXY;
|
||||
|
||||
{**
|
||||
@param(ecGotoXY)() 跳转光标到指定位置,对应参数为 array(y,x) %%
|
||||
@param(ecSelGotoXY)() 选中文本到指定位置,对应参数为 array(y,x) %%
|
||||
|
|
@ -427,37 +406,7 @@ type TCustomMemoCmd=class() //
|
|||
@param(ecPaste)() 粘贴剪切板文本,无对应参数 %%
|
||||
@param(ecString)() 插入字符串,对应参数为 字符串 %%
|
||||
**}
|
||||
static ecSelection;
|
||||
static ecSelLeft;
|
||||
static ecSelRight;
|
||||
static ecSelUp;
|
||||
static ecSelDown;
|
||||
static ecSelWordLeft;
|
||||
static ecSelWordRight;
|
||||
static ecSelLineStart;
|
||||
static ecSelLineEnd;
|
||||
static ecSelPageUp;
|
||||
static ecSelPageDown;
|
||||
static ecSelPageLeft;
|
||||
static ecSelPageRight;
|
||||
static ecSelPageTop;
|
||||
static ecSelPageBottom;
|
||||
static ecSelEditorTop;
|
||||
static ecSelEditorBottom;
|
||||
static ecSelGotoXY;
|
||||
static ecSelectAll;
|
||||
static ecCopy;
|
||||
static ecScrollUp;
|
||||
static ecScrollDown;
|
||||
static ecScrollLeft;
|
||||
static ecScrollRight;
|
||||
static ecInsertMode;
|
||||
static ecOverwriteMode;
|
||||
static ecToggleMode;
|
||||
static ecNormalSelect;
|
||||
static ecColumnSelect;
|
||||
static ecLineSelect;
|
||||
static ecMatchBracket;
|
||||
|
||||
{static ecGotoMarker0;
|
||||
static ecGotoMarker1;
|
||||
static ecGotoMarker2;
|
||||
|
|
@ -478,159 +427,36 @@ type TCustomMemoCmd=class() //
|
|||
static ecSetMarker7;
|
||||
static ecSetMarker8;
|
||||
static ecSetMarker9;}
|
||||
static ecDeleteLastChar;
|
||||
static ecDeleteChar;
|
||||
static ecDeleteWord;
|
||||
static ecDeleteLastWord;
|
||||
static ecDeleteBOL;
|
||||
static ecDeleteEOL;
|
||||
static ecDeleteLine;
|
||||
static ecClearAll;
|
||||
static ecLineBreak;
|
||||
static ecInsertLine;
|
||||
static ecChar;
|
||||
static ecImeStr;
|
||||
static ecUndo;
|
||||
static ecRedo;
|
||||
static ecCut;
|
||||
static ecPaste;
|
||||
static ecBlockIndent;
|
||||
static ecBlockUnindent;
|
||||
static ecTab;
|
||||
static ecShiftTab;
|
||||
static ecAutoCompletion;
|
||||
static ecComment;
|
||||
static ecUnComment;
|
||||
static ecNextBlock;
|
||||
static ecPrevBlock;
|
||||
static ecNextJumpOut;
|
||||
static ecPrevJumpOut;
|
||||
static ecUserFirst;
|
||||
static ecFind;
|
||||
static ecReplace;
|
||||
static ecSearchAgain;
|
||||
static ecFindAll;
|
||||
static ecString;
|
||||
static ecSearchUpAgain;
|
||||
protected
|
||||
class function InitCommandConst();
|
||||
begin
|
||||
ecNone := 0; // Nothing. Useful for user event to handle command
|
||||
ecViewCommandFirst := 0;
|
||||
ecViewCommandLast := 500;
|
||||
ecEditCommandFirst := 501;
|
||||
ecEditCommandLast := 1000;
|
||||
ecLeft := 1; // Move cursor left one char
|
||||
ecRight := 2; // Move cursor right one char
|
||||
ecUp := 3; // Move cursor up one line
|
||||
ecDown := 4; // Move cursor down one line
|
||||
ecWordLeft := 5; // Move cursor left one word
|
||||
ecWordRight := 6; // Move cursor right one word
|
||||
ecLineStart := 7; // Move cursor to beginning of line
|
||||
ecLineEnd := 8; // Move cursor to end of line
|
||||
ecPageUp := 9; // Move cursor up one page
|
||||
ecPageDown := 10; // Move cursor down one page
|
||||
ecPageLeft := 11; // Move cursor right one page
|
||||
ecPageRight := 12; // Move cursor left one page
|
||||
ecPageTop := 13; // Move cursor to top of page
|
||||
ecPageBottom := 14; // Move cursor to bottom of page
|
||||
ecEditorTop := 15; // Move cursor to absolute beginning
|
||||
ecEditorBottom := 16; // Move cursor to absolute end
|
||||
ecGotoXY := 17; // Move cursor to specific coordinates, Data := PPoint
|
||||
//******************************************************************************
|
||||
// Maybe the command processor should just take a boolean that signifies if
|
||||
// selection is affected or not?
|
||||
//******************************************************************************
|
||||
ecSelection := 100; // Add this to ecXXX command to get equivalent
|
||||
// command, but with selection enabled. This is not
|
||||
// a command itself.
|
||||
// Same as commands above, except they affect selection, too
|
||||
ecSelLeft := ecLeft+ecSelection;
|
||||
ecSelRight := ecRight+ecSelection;
|
||||
ecSelUp := ecUp+ecSelection;
|
||||
ecSelDown := ecDown+ecSelection;
|
||||
ecSelWordLeft := ecWordLeft+ecSelection;
|
||||
ecSelWordRight := ecWordRight+ecSelection;
|
||||
ecSelLineStart := ecLineStart+ecSelection;
|
||||
ecSelLineEnd := ecLineEnd+ecSelection;
|
||||
ecSelPageUp := ecPageUp+ecSelection;
|
||||
ecSelPageDown := ecPageDown+ecSelection;
|
||||
ecSelPageLeft := ecPageLeft+ecSelection;
|
||||
ecSelPageRight := ecPageRight+ecSelection;
|
||||
ecSelPageTop := ecPageTop+ecSelection;
|
||||
ecSelPageBottom := ecPageBottom+ecSelection;
|
||||
ecSelEditorTop := ecEditorTop+ecSelection;
|
||||
ecSelEditorBottom := ecEditorBottom+ecSelection;
|
||||
ecSelGotoXY := ecGotoXY+ecSelection; // Data := PPoint
|
||||
ecSelectAll := 199; // Select entire contents of editor, cursor to end
|
||||
ecCopy := 201; // Copy selection to clipboard
|
||||
ecScrollUp := 211; // Scroll up one line leaving cursor position unchanged.
|
||||
ecScrollDown := 212; // Scroll down one line leaving cursor position unchanged.
|
||||
ecScrollLeft := 213; // Scroll left one char leaving cursor position unchanged.
|
||||
ecScrollRight := 214; // Scroll right one char leaving cursor position unchanged.
|
||||
ecInsertMode := 221; // Set insert mode
|
||||
ecOverwriteMode := 222; // Set overwrite mode
|
||||
ecToggleMode := 223; // Toggle ins/ovr mode
|
||||
ecNormalSelect := 231; // Normal selection mode
|
||||
ecColumnSelect := 232; // Column selection mode
|
||||
ecLineSelect := 233; // Line selection mode
|
||||
ecMatchBracket := 250; // Go to matching bracket
|
||||
{ecGotoMarker0 := 301; // Goto marker
|
||||
ecGotoMarker1 := 302; // Goto marker
|
||||
ecGotoMarker2 := 303; // Goto marker
|
||||
ecGotoMarker3 := 304; // Goto marker
|
||||
ecGotoMarker4 := 305; // Goto marker
|
||||
ecGotoMarker5 := 306; // Goto marker
|
||||
ecGotoMarker6 := 307; // Goto marker
|
||||
ecGotoMarker7 := 308; // Goto marker
|
||||
ecGotoMarker8 := 309; // Goto marker
|
||||
ecGotoMarker9 := 310; // Goto marker
|
||||
ecSetMarker0 := 351; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker1 := 352; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker2 := 353; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker3 := 354; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker4 := 355; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker5 := 356; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker6 := 357; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker7 := 358; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker8 := 359; // Set marker, Data := PPoint - X, Y Pos
|
||||
ecSetMarker9 := 360; // Set marker, Data := PPoint - X, Y Pos
|
||||
}
|
||||
ecDeleteLastChar := 501; // Delete last char (i.e. backspace key)
|
||||
ecDeleteChar := 502; // Delete char at cursor (i.e. delete key)
|
||||
ecDeleteWord := 503; // Delete from cursor to end of word
|
||||
ecDeleteLastWord := 504; // Delete from cursor to start of word
|
||||
ecDeleteBOL := 505; // Delete from cursor to beginning of line
|
||||
ecDeleteEOL := 506; // Delete from cursor to end of line
|
||||
ecDeleteLine := 507; // Delete current line
|
||||
ecClearAll := 508; // Delete everything
|
||||
ecLineBreak := 509; // Break line at current position, move caret to new line
|
||||
ecInsertLine := 510; // Break line at current position, leave caret
|
||||
ecChar := 511; // Insert a character at current position
|
||||
ecImeStr := 550; // Insert character(s) from IME
|
||||
ecUndo := 601; // Perform undo if available
|
||||
ecRedo := 602; // Perform redo if available
|
||||
ecCut := 603; // Cut selection to clipboard
|
||||
ecPaste := 604; // Paste clipboard to current position
|
||||
ecBlockIndent := 610; // Indent selection
|
||||
ecBlockUnindent := 611; // Unindent selection
|
||||
ecTab := 612; // Tab key
|
||||
ecShiftTab := 613; // Shift+Tab key
|
||||
ecAutoCompletion := 650;
|
||||
ecComment := 651;
|
||||
ecUnComment := 652;
|
||||
ecNextBlock := 701;
|
||||
ecPrevBlock := 702;
|
||||
ecNextJumpOut := 703;
|
||||
ecPrevJumpOut := 704;
|
||||
ecUserFirst := 1001; // Start of user-defined commands
|
||||
ecFind := ecUserFirst+1;
|
||||
ecReplace := ecUserFirst+2;
|
||||
ecSearchAgain := ecUserFirst+3;
|
||||
ecFindAll := ecUserFirst+4;
|
||||
ecString := ecUserFirst+5;
|
||||
ecSearchUpAgain := ecUserFirst+6;
|
||||
end
|
||||
static const ecNone=0x0;static const ecViewCommandFirs=NIL;
|
||||
static const ecViewCommandLast=0x1F4;static const ecEditCommandFirs=NIL;static const ecEditCommandLast=0x3E8;
|
||||
static const ecLeft=0x1;static const ecRight=0x2;static const ecUp=0x3;
|
||||
static const ecDown=0x4;static const ecWordLeft=0x5;static const ecWordRight=0x6;
|
||||
static const ecLineStart=0x7;static const ecLineEnd=0x8;static const ecPageUp=0x9;
|
||||
static const ecPageDown=0xA;static const ecPageLeft=0xB;static const ecPageRight=0xC;
|
||||
static const ecPageTop=0xD;static const ecPageBottom=0xE;static const ecEditorTop=0xF;
|
||||
static const ecEditorBottom=0x10;static const ecGotoXY=0x11;static const ecSelection=0x64;
|
||||
static const ecSelLeft=0x65;static const ecSelRight=0x66;static const ecSelUp=0x67;
|
||||
static const ecSelDown=0x68;static const ecSelWordLeft=0x69;static const ecSelWordRight=0x6A;
|
||||
static const ecSelLineStart=0x6B;static const ecSelLineEnd=0x6C;static const ecSelPageUp=0x6D;
|
||||
static const ecSelPageDown=0x6E;static const ecSelPageLeft=0x6F;static const ecSelPageRight=0x70;
|
||||
static const ecSelPageTop=0x71;static const ecSelPageBottom=0x72;static const ecSelEditorTop=0x73;
|
||||
static const ecSelEditorBottom=0x74;static const ecSelGotoXY=0x75;static const ecSelectAll=0xC7;
|
||||
static const ecCopy=0xC9;static const ecScrollUp=0xD3;static const ecScrollDown=0xD4;
|
||||
static const ecScrollLeft=0xD5;static const ecScrollRight=0xD6;static const ecInsertMode=0xDD;
|
||||
static const ecOverwriteMode=0xDE;static const ecToggleMode=0xDF;static const ecNormalSelect=0xE7;
|
||||
static const ecColumnSelect=0xE8;static const ecLineSelect=0xE9;static const ecMatchBracket=0xFA;
|
||||
static const ecDeleteLastChar=0x1F5;static const ecDeleteChar=0x1F6;static const ecDeleteWord=0x1F7;
|
||||
static const ecDeleteLastWord=0x1F8;static const ecDeleteBOL=0x1F9;static const ecDeleteEOL=0x1FA;
|
||||
static const ecDeleteLine=0x1FB;static const ecClearAll=0x1FC;static const ecLineBreak=0x1FD;
|
||||
static const ecInsertLine=0x1FE;static const ecChar=0x1FF;static const ecImeStr=0x226;
|
||||
static const ecUndo=0x259;static const ecRedo=0x25A;static const ecCut=0x25B;
|
||||
static const ecPaste=0x25C;static const ecBlockIndent=0x262;static const ecBlockUnindent=0x263;
|
||||
static const ecTab=0x264;static const ecShiftTab=0x265;static const ecAutoCompletion=0x28A;
|
||||
static const ecComment=0x28B;static const ecUnComment=0x28C;static const ecNextBlock=0x2BD;
|
||||
static const ecPrevBlock=0x2BE;static const ecNextJumpOut=0x2BF;static const ecPrevJumpOut=0x2C0;
|
||||
static const ecUserFirst=0x3E9;static const ecFind=0x3EA;static const ecReplace=0x3EB;
|
||||
static const ecSearchAgain=0x3EC;static const ecFindAll=0x3ED;static const ecString=0x3EE;
|
||||
static const ecSearchUpAgain=0x3EF;
|
||||
end
|
||||
|
||||
type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //编辑器基类
|
||||
|
|
@ -683,18 +509,20 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
fUndoList; //撤销
|
||||
fRedoList; //反撤销
|
||||
//******操作标记********
|
||||
static crInsert;
|
||||
static crPaste;
|
||||
static crDragDropInsert;
|
||||
static crDeleteAfterCursor;
|
||||
static crDelete;
|
||||
static crLineBreak;
|
||||
static crIndent;
|
||||
static crUnindent;
|
||||
static crSilentDelete;
|
||||
static crSilentDeleteAfterCursor;
|
||||
static crNothing;
|
||||
static smNormal,smLine,smColumn;
|
||||
static const crInsert = 1;
|
||||
static const crPaste = 2;
|
||||
static const crDragDropInsert = 3;
|
||||
static const crDeleteAfterCursor = 4;
|
||||
static const crDelete = 5;
|
||||
static const crLineBreak = 6;
|
||||
static const crIndent = 6;
|
||||
static const crUnindent = 7;
|
||||
static const crSilentDelete = 8;
|
||||
static const crSilentDeleteAfterCursor = 9;
|
||||
static const crNothing = 10;
|
||||
static const smNormal = 0;
|
||||
static const smLine = 1;
|
||||
static const smColumn = 2;
|
||||
//****************
|
||||
protected
|
||||
|
||||
|
|
@ -1075,28 +903,6 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
FSetPostioned := 0;
|
||||
InvalidateRect(nil,false);
|
||||
end
|
||||
class function sinit();override;
|
||||
begin
|
||||
if not crInsert then
|
||||
begin
|
||||
crInsert := 1;
|
||||
crPaste := 2;
|
||||
crDragDropInsert := 3;
|
||||
crDeleteAfterCursor := 4;
|
||||
crDelete := 5;
|
||||
crLineBreak := 6;
|
||||
crIndent := 6;
|
||||
crUnindent := 7;
|
||||
crSilentDelete := 8;
|
||||
crSilentDeleteAfterCursor := 9;
|
||||
crNothing := 10;
|
||||
smNormal := 0;
|
||||
smLine := 1;
|
||||
smColumn := 2;
|
||||
InitCommandConst();
|
||||
end
|
||||
inherited;
|
||||
end
|
||||
public //滚动刷新,构造
|
||||
function IncPaintLock();
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -2269,6 +2269,87 @@ type tinstancemanager = class()
|
|||
private
|
||||
fhandles;
|
||||
end
|
||||
type tstr_step_match=class()
|
||||
{**
|
||||
@explan(说明)字符串数组匹配 %%
|
||||
**}
|
||||
function create(its); //送入匹配的字符串数组
|
||||
begin
|
||||
fits := array();
|
||||
findstaks := array();
|
||||
findidxs := array("");
|
||||
set_items(its);
|
||||
end
|
||||
function step_find_idx(s:string); //匹配的序号
|
||||
begin
|
||||
{**
|
||||
@explan(说明)匹配字符串 %%
|
||||
@param(s)(string) 匹配的目标 %%
|
||||
@return(array of integer) 成功的位置 %%
|
||||
**}
|
||||
idx := 0;
|
||||
d := getsdata(s);
|
||||
if ifarray(d) then return d; //已经存在了,返回
|
||||
for i := 1 to length(s) do //失效判断
|
||||
begin
|
||||
si := s[1:i];
|
||||
if findidxs[i]<>si then //判断失效位置
|
||||
begin
|
||||
findidxs := findidxs[0:(i-1)];
|
||||
break;
|
||||
end
|
||||
end
|
||||
for i:= length(findidxs) to length(s) do //从有效位置开始处理
|
||||
begin
|
||||
si := s[1:i];
|
||||
asi := array();
|
||||
asidx := 0;
|
||||
for ii,v in findstaks[i-1] do //判断每个值
|
||||
begin
|
||||
if checksame(si,v) then
|
||||
begin
|
||||
asi[asidx++] := v;
|
||||
end
|
||||
end
|
||||
findstaks[i] := asi; //得到新的值
|
||||
findidxs[i] := si;
|
||||
end
|
||||
return findstaks[length(findidxs)-1];//fits[];
|
||||
end
|
||||
function step_find(s); //查找匹配的字符
|
||||
begin
|
||||
return fits[step_find_idx(s)];
|
||||
end
|
||||
function set_items(its); //设置查找数据
|
||||
begin
|
||||
if fits<> its and check_legal(its) then
|
||||
begin
|
||||
fits := its;
|
||||
findstaks := array(0->(length(fits)-1));
|
||||
findidxs := array("");
|
||||
end
|
||||
end
|
||||
private
|
||||
function checksame(a,b);virtual;//判断相等
|
||||
begin
|
||||
return pos(a,fits[ b]);
|
||||
end
|
||||
function check_legal(its);virtual; //合法检查
|
||||
begin
|
||||
return ifarray(its);
|
||||
end
|
||||
function getsdata(s);//获取成功的位置
|
||||
begin
|
||||
for i,v in findidxs do
|
||||
begin
|
||||
if v=s then return findstaks[i];
|
||||
end
|
||||
end
|
||||
private
|
||||
fits; //原始数据
|
||||
findstaks; //历史匹配记录
|
||||
findidxs;//字符串
|
||||
end
|
||||
implementation
|
||||
function iffuncptr(fn);
|
||||
begin
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in New Issue