Курсовая работа: Разработка средства функционального диагностирования вычислительных устройств
}
// –
void __fastcall TForm1: Cycle (TStringGrid *tab, int imin, int imax, int iinc, int jmin, int jmax, int jinc)
{
for (int i=imin; i<imax; i=i+iinc) {
for (int j = jmin; j<jmax; j=j+jinc) {
if (n % 2 == 1) {
tab->Cells[i] [1] = tab->Cells [j-1] [6];
tab->Cells[i] [2] = tab->Cells [j-1] [5];
tab->Cells[i] [3] = tab->Cells[j] [6];
tab->Cells[i] [4] = tab->Cells[j] [5];
}
else {
tab->Cells[i] [1] = tab->Cells [j-1] [5];
tab->Cells[i] [2] = tab->Cells [j-1] [6];
tab->Cells[i] [3] = tab->Cells[j] [5];
tab->Cells[i] [4] = tab->Cells[j] [6];
}
}}}
// –
void __fastcall TForm1:IF1 (TStringGrid *tab, int head, int tail, int m)
{
if (n % 2 == 1) {
StringGrid1->Cells[head] [1] = StringGrid1->Cells[tail] [5];
StringGrid1->Cells[head] [2] = StringGrid1->Cells[tail] [6];
StringGrid1->Cells[head] [3] = StringGrid1->Cells[m] [5];
StringGrid1->Cells[head] [4] = StringGrid1->Cells[m] [6];
}
else