Курсовая работа: Опрацювання масивів
begin
Search_DU: =False;
if Edit1. Text<>'' then begin
for i: = 1 to MaxX do
for j: = 1 to MaxY do
if (i+Length(Edit1. Text) - 1) <=MaxX then begin
for k: =Length(Edit1. Text) - 1 DownTo 0 do
Myword: =Myword+SBut [i+k,j]. Caption;
if Myword=Edit1. Text then begin
for k: =Length(Edit1. Text) - 1 DownTo 0 do begin
sbut [i+k,j]. Font. Color: =clBlue;
sbut [i+k,j]. Color: = clGreen;
end;
Search_DU: =True;
{Exit; }
end else Myword: ='';
end;
end;
end;
procedure TForm1. Search;
var Find,F1,F2,F3,F4: Boolean;
begin
if SearCB. ItemIndex<0 then Search_LR;
Find: =True;
F1: =True; F3: =True;
F2: =True; F4: =True;
case SearCB. ItemIndex of
0: Find: =Search_LR;
1: Find: =Search_RL;