Курсовая работа: Опрацювання масивів
end;
end;
end;
function TForm1. Search_UD: Boolean;
var
i, j, k: integer;
Myword: String;
begin
Search_UD: =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: =0 to Length(Edit1. Text) - 1 do
Myword: =Myword+SBut [i+k,j]. Caption;
if Myword=Edit1. Text then begin
for k: =0 to Length(Edit1. Text) - 1 do begin
sbut [i+k,j]. Font. Color: =clBlack;
sbut [i+k,j]. Color: = clRed;
end;
Search_UD: =True;
{Exit; }
end else Myword: ='';
end;
end;
end;
function TForm1. Search_DU: Boolean;
var
i, j, k: integer;