ults;: TMark; TabbedNotebook1. PageIndex of
: begin (StudentFile, «students. std»); (StudentFile); J:=1 to StringGrid1. RowCount - 1 doStringGrid1. Cells [0, j] <> «» thenStudentRecord, StringGrid1 do:=StrToIntDef (Cells [0, j], - 1);:=Cells [1, j];:=StrToIntDef (Cells [2, j], - 1);:=((Cells [3 , j])="Так") or ((Cells [3, j])=«ТАК») or
((Cells [3, j])=«так»); (StudentFile, StudentRecord);; (StudentFile);;
: begin (ResultsFile, «results. rsl»); (ResultsFile); J:=1 to StringGrid2. RowCount - 1 doStringGrid2. Cells [0, j] <> «» thenResultRecord, StringGrid2 do:=StrToIntDef (Cells [0, j], - 1);. NAME:=Cells [1, j];:=Cells [2, j]; (ResultsFile, ResultRecord);; (ResultsFile);;
: begin (MarksFile, «mark. mrk»); (MarksFile); J:=1 to StringGrid1. RowCount - 1 doStringGrid3. Cells [0, j] <> «» thenMarkRecord, StringGrid3 do:=StrToIntDef (Cells [0, j], - 1);:=StrToIntDef (Cells [1, j], - 1);:=StrToIntDef (Cells [2, j], - 1);: =StrToIntDef (Cells [3, j], - 1); (MarksFile, MarkRecord);; (MarksFile);;; («Невірні дані!», mtWarning, [mbOk], 0);;; TForm1. N5Click (Sender: TObject);; TForm1. SortString;, n, i: integer;: integer;: boolean;: array [1.50] of string;:=0;:=0; I:=1 to tabl. RowCount doTabl. Cells [aCol, i] <> «» then (n); j:=1 to n - 1 do:=j;:=0; SorType of: res:=(Tabl. Cells [aCol, i]> Tabl. Cells [aCol, i + 1]) ;: res:=(strtoint (Tabl. Cells [aCol, i])> strtoint (Tabl. Cells [aCol, i + 1]));; res then (Tabl). MoveRow (i, i +1);:=1; (i); (FindCount, 1);; (flag=0) or (i=0);; FindCount> 0 then («Сортування закінчена! Кроків:» + inttostr (FindCount), mtWarning, [mbOk], 0); («Невірні дані!», MtWarning, [mbOk], 0);;:=0; ; TForm1. StringGrid1MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer);: TGridCoord;, Acol: integer;:=StringGrid1. MouseCoord (x, y);:=Coord. Y;:=Coord. X; (Acol>=0) and (ARow>=0) then (ACol=0) thenArow in [1, 3] then (StringGrid1, aRow, TypeString); Arow in [0, 2] then (StringGrid1, aRow, TypeInteger);;;; TForm1. StringGrid2MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer);: TGridCoord;, Acol: integer;:=StringGrid2. MouseCoord (x, y);:=Coord. Y;:=Coord. X; (Acol>=0) and (ARow>=0) then (ACol=0) thenArow=1 then (StringGrid2, aRow, TypeString); Arow in [0, 2] then (StringGrid2, aRow, TypeInteger) ;;;; TForm1. StringGrid3MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer);: TGridCoord;, Acol: integer;:=StringGrid3. MouseCoord (x, y);:=Coord. Y;:=Coord. X; (Acol>=0) and (ARow>=0) then (ACol=0) then (StringGrid3, aRow, TypeInteger);;; TForm1. StringGrid4MouseUp (Sender: TObject; Button: TMouseButton;: TShiftState; X, Y: Integer);: TGridCoord;, Acol: integer;:=StringGrid4. MouseCoord (x, y);:=Coord. Y;:=Coord. X; (Acol>=0) and (ARow>=0) then (ARow=0) then (StringGrid4, aRow, TypeInteger); (ARow=1) then (StringGrid4, aRow, TypeString);;; TForm1. BinaryFind (aStart: integer; aVal: string; aCol: integer; Tabl: TStringGrid): integer;, p, i, flag: integer;: string;:=aStart + 1;// Початок діапазону:=0;// Кінець діапазону;:=- 1; i:=1 to tabl. RowCount - 1 doTabl. Cells [0, i] <> «» then (p);
/ / q:=1;// Start;
{if (p=0) then; } P < q then:=1;:=- 1;:=trunc ((q + p) / 2);:=Tabl. Cells [aCol, i]; (aVal Tabl. Cells [...