Информатика. Программирование в Delphi
185
'0'..'9',#8:;
',','.':
begin
key:=DecimalSeparator;
if pos(key,ComboBox1.Text)<>0 then
key:=#0;
end
else
key:=#0;
end;
end;
procedure TForm1.ComboBox2KeyPress (Sender: TObject; var Key: Char);
begin
case key of
'0'..'9',#8:;
',','.':
begin
key:=DecimalSeparator;
if pos(key,ComboBox1.Text)<>0 then
key:=#0;
end
else
key:=#0;
end;
end;
procedure TForm1.Button1Click (Sender: TObject);
const
gr=pi/180;
var
x,y,z:real;
begin
if ComboBox3.ItemIndex in [0,1,2,3] then
begin
if (ComboBox1.Text)='' then
exit;
end
else
if ((ComboBox1.Text)='') or (ComboBox2.Text='') then
exit;
case ComboBox1.ItemIndex of
0:x:=0;
1:x:=pi/6;
I...,175,176,177,178,179,180,181,182,183,184 186,187,188,189,190,191,192,193,194,195,...370