Нашли или выдавили из себя код, который нельзя назвать нормальным,
на который без улыбки не взглянешь?
Не торопитесь его удалять или рефакторить, — запостите его на
говнокод.ру, посмеёмся вместе!
if RadioGroup1.ItemIndex=0 then cpr:=cpr+1;
if RadioGroup1.ItemIndex=1 then cth:=cth+1;
if RadioGroup2.ItemIndex=0 then cch:=cch+1;
if RadioGroup2.ItemIndex=1 then czs:=czs+1;
if RadioGroup3.ItemIndex=0 then chd:=chd+1;
if RadioGroup3.ItemIndex=1 then cpr:=cpr+1;
if RadioGroup4.ItemIndex=0 then cth:=cth+1;
if RadioGroup4.ItemIndex=1 then cch:=cch+1;
if RadioGroup5.ItemIndex=0 then czs:=czs+1;
if RadioGroup5.ItemIndex=1 then chd:=chd+1;
if RadioGroup6.ItemIndex=0 then cpr:=cpr+1;
if RadioGroup6.ItemIndex=1 then cch:=cch+1;
if RadioGroup7.ItemIndex=0 then chd:=chd+1;
if RadioGroup7.ItemIndex=1 then cth:=cth+1;
....// Это всё в 60 строк
if (cpr>cth) and (cpr>cch) and (cpr>czs) and (cpr>chd) then cpr1:=+1
else
if (cth>cpr) and (cth>cch) and (cth>czs) and (cth>chd) then cth1:=+1
else
if (cch>cpr) and (cch>cth) and (cch>czs) and (cch>chd) then cch1:=+1
else
if (czs>cpr) and (czs>cch) and (czs>cth) and (czs>chd) then czs1:=+1
else
if (chd>cpr) and (chd>cch) and (chd>czs) and (chd>cth) then chd1:=+1;
if cpr>chd or czs or cth or cch then
begin
ShowMessage('человек-природа – все профессии, связанные с растениеводством, животноводством и лесным хозяйством;') ;
Datamodule4.ADOTable1.Edit;
Datamodule4.ADOTable1.FieldValues['test2']:=('человек-природа – все профессии, связанные с растениеводством, животноводством и лесным хозяйством;');
Datamodule4.ADOTable1.Post;
end
else
if chd>cpr or cth or cch or czs then begin
ShowMessage('человек-техника – все технические профессии;') ;
Datamodule4.ADOTable1.Edit;
Datamodule4.ADOTable1.FieldValues['test2']:=('человек-техника – все технические профессии;');
Datamodule4.ADOTable1.Post;
...... И далее результаты в общем их 5
отдельная кнопка для вывода остальных 10 вопросов х)
procedure TForm1.Button1Click(Sender: TObject);
begin
Radiogroup11.Visible:=true;
Radiogroup12.Visible:=true;
Radiogroup13.Visible:=true;
Radiogroup14.Visible:=true;
Radiogroup15.Visible:=true;
Radiogroup16.Visible:=true;
Radiogroup17.Visible:=true;
Radiogroup18.Visible:=true;
Radiogroup19.Visible:=true;
Radiogroup20.Visible:=true;
Button2.Visible:=True;
end;
Программа тестирования на профориентацию
хД сколько он radiogroup создал)
к$N.T!SK:C,O(I(Q A"K:E$Y A"G P,Z)M"O.F$OD$L!RD(Z:K$J,Z:F!M!Q:P?Z?P(G(Y)UKP M OB.V(C:E?W?H!I D O B H V)TU:E:I:M!D$Q$N"T!T?C$J(Y(H!V?L:D,J?W,F$U:C?F!Q!R?T?NV)R(Z:G"B"N$M.H$U,I A"W!Z?F,J)J$T(U(S$L?S)I E)R!V)TG!D$A"L(L)TL)R.NIS:V$T)R:J!W)Q$F(Y!P:Q.T,V?LW,Q:A(S)F$Q.Q:W)CA$B"U?E,T?H?R!A.D)N)J:L!D"L:G,RC"G,I)B(D(L L?F"O!T.E)B(G.W.H(R,D(N"R.H?L!B,P,E"B!F.GL)HV?BY"U,Y V)I$N,NA$R)Y!F)F"M?X!W.XL.B W:Q(V!L,V$IX!E"P$J$G.X(E?W)T!V!L L Z!Z.E?V:Z!P:L,F!W$N.LD!S)T)C:C$N?Z!Y)Z?V,L$A:Q,V$O!P.B:N!P(A,L"V(NH:CP P"D!OРHPEUKKMREQFNFUGRJBDSGOBKSKIZCKZQJSJADQBYXYTHQZCCWXRJPSSERMEAESBHCIV
Комментарии (8) RSS