ible = true;
for (i = 0; i getSt (); i + +) // Вивід на екран регістрів кодера
{StringGrid3-> Cells [i] [0] = IntToStr (My-> getReg () [i]);} * Err = My-> getErr (); (Err = = 0) {Err = new bool [My-> getV ()];} -> ColCount = My-> getV (); (i = 0; i getV (); i + +)
{Err [i] = 0; StringGrid4-> Cells [i] [0] = IntToStr (My-> getInf () [i]); -> Cells [i] [ 1] = IntToStr (0);} -> Visible = true; My-> setErr (Err);}
// декодування
{My-> Decod (); StringGrid5-> ColCount = My-> getSt (); StringGrid5-> Visible = true; (i = 0; i getSt (); i + +) {StringGrid5-> Cells [i] [0] = IntToStr (My-> getDec () [i]);}
int E = 0; // наявність помилки (i = 0; i getSt (); i + +) // перевірка регстра декодара на наявність "1"
{if (My-> getDec () [i] == 1) E = 1;}
if (E == 0) Label6-> Caption = "Помилок не виявлено"; // нульову вагу залишку (E == 1) Label6-> ; Caption = "Передача зроблена з помилками";}
// Збереження полінома в файл
{SaveDialog1-> DefaultExt = "pol"; SaveDialog1-> FilterIndex = 2; (SaveDialog1-> Execute ())
{FILE * P = fopen (SaveDialog1-> FileName.c_str (), "w +"); fseek (P, 0l, 0); (My-> getPol () ! = 0)
{char A = 0; int B = 128; (i = 0; i <= (My-> getSt ())/8; i + +)
{A = 0; B = 0x80; (j = 0; j <8; j + +)
{if (8 * i + j <= My-> getSt ()) A = A | ((My-> getPol () [i * 8 + j]) * B) ; = B/2;} (A, P);} (P);} } }
// Завантаження полінома з файлу
{OpenDialog1-> DefaultExt = "pol"; OpenDialog1-> FilterIndex = 2; (OpenDialog1-> Execute ())
{FILE * P = fopen (OpenDialog1-> FileName.c_str (), "r"); fseek (P, 0l, 0);> setSt (StrToInt (Edit1-> Text)); char a [4] = {0}; i = 0; {a [i] = fgetc (P); i + +;} while (feof (P) == 0 && i <4); ( My-> getPol ()! = 0) delete [My-> getSt () +1] My-> getPol (); -> ColCount = My-> getSt () +1; bool * Pol = new bool [32]; char A = 128;
for (i = 0; i <4; i + +) // вивід на екран
{A = 128; (j = 0; j <8; j + +)
{Pol [8 * i + j] = ((a [i] & A)>> (7-j)) &0x1; A = A/2;}} (i = 0; i <= My-> getSt (); i + +)
{StringGrid2-> Cells [i] [0] = IntToStr (My-> getSt ()...