lick (TObject * Sender)
{Randomize (); My-> setSt (StrToInt (Edit1-> Text));
int Step_P = My-> getSt (); // зчитування ступеня полінома
StringGrid2-> ColCount = Step_P +1; (My-> getPol ()! = 0) delete [Step_P +1] My-> getPol (); // якщо маса не инициализирован * Pol = new bool [Step_P +1]; Pol [0] = 1; Pol [Step_P] = 1; (i = 1; i // ініціалізація полінома (i = 0; i
{StringGrid2-> Cells [i] [1] = IntToStr (Pol [i]); -> Cells [i] [0] = IntToStr (Step_P-i);} // вивід на екран-> Visible = true; Label2-> Visible = true; My-> setPol (Pol);}
// інверсія елемента в масиві полінома
{Scan = ACol;}
{int align = "justify">// Заповнення інформаційного масиву random
{bool * Inf = My-> getInf (); (Inf == 0) Inf = new bool [240]; -> ColCount = 240; (i = 0; i getV ()-Step_P; i + +) // Ініціалізація інформації
{Inf [i] = random (2); StringGrid1-> Cells [i] [0] = IntToStr (Inf [i]);} (i = My-> getV () -Step_P; i getV (); i + +)
{Inf [i] = 0; StringGrid1-> Cells [i] [0] = IntToStr (Inf [i]);} // Умоножаем на ступінь полінома-> Visible = true; My-> setInf (Inf); align = "justify">// завантаження з файлу
{bool * Inf = My-> getInf (); OpenDialog1-> DefaultExt = "isk"; OpenDialog1-> FilterIndex = 2; (OpenDialog1-> Execute ())
{FILE * P = fopen (OpenDialog1-> FileName.c_str (), "r"); fseek (P, 0l, 0); a [33] = {0}; i = 0; {a [i] = fgetc (P); i + +;} while (feof (P) == 0 && i <33); (Inf == 0) Inf = new bool [My-> getV ()]; char A = 128;
for (i = 0; i <30; i + +) // вивід на екран
{A = 128; (j = 0; j <8; j + +)
{Inf [8 * i + j] = ((a [i] & A)>> (7-j)) &0x1; A = A/2;}} -> ColCount = My-> getV (); StringGrid4-> ColCount = My-> getV (); (i = 0; i getV (); i + +)
{StringGrid4-> Cells [i] [0] = IntToStr (Inf [i]); StringGrid1-> Cells [i] [0] = IntToStr (Inf [i]);} -> Visible = true; StringGrid4-> Visible = true;> setInf (Inf); fclose (P);}}}
// кодування інформації
{My-> Cod (); StringGrid3-> ColCount = My-> getSt (); StringGrid3-> Vis...