Chichero
28-06-2011, 04:06:24
Tengo que realizar un programa que para diferentes ciudades que coloque en una combobox muestre dos variables (Tbse y Tbhe):
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Var Tbse, Tbhe: real;
City:integer;
//Selectiva Multiple Principal para fijacion de condiciones exteriores e interiores
City:=ComboBox1.ItemIndex;
CASE City OF
//a
0 Or 1 Or 3 Or 15 Or 17 Or 28: Begin
Tbse:= 95;
Tbhe:=78;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
Label9.Caption:= FloatToStr(Tbsi);
Label119.Caption:= FloatToStr(HR);
end;
//b
2 Or 16: Begin
Tbse:= 95;
Tbhe:=76;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//c
4 Or 25: Begin
Tbse:= 96;
Tbhe:=80;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//d
5: Begin
Tbse:= 95;
Tbhe:=73;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//e
6 Or 9 Or 13 Or 18 or 19 or 20: Begin (ACA ME DICE ERROR DE "Duplicate case label")
Tbse:= 95;
Tbhe:=81;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
.
.
.
Es como si ya hubiese definido alguno de los numeros del caso //e pero en realidad no fue así, entonces no corre el programa
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Var Tbse, Tbhe: real;
City:integer;
//Selectiva Multiple Principal para fijacion de condiciones exteriores e interiores
City:=ComboBox1.ItemIndex;
CASE City OF
//a
0 Or 1 Or 3 Or 15 Or 17 Or 28: Begin
Tbse:= 95;
Tbhe:=78;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
Label9.Caption:= FloatToStr(Tbsi);
Label119.Caption:= FloatToStr(HR);
end;
//b
2 Or 16: Begin
Tbse:= 95;
Tbhe:=76;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//c
4 Or 25: Begin
Tbse:= 96;
Tbhe:=80;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//d
5: Begin
Tbse:= 95;
Tbhe:=73;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
//e
6 Or 9 Or 13 Or 18 or 19 or 20: Begin (ACA ME DICE ERROR DE "Duplicate case label")
Tbse:= 95;
Tbhe:=81;
Label4.Caption:= FloatToStr(Tbse);
Label6.Caption:= FloatToStr(Tbhe);
end;
.
.
.
Es como si ya hubiese definido alguno de los numeros del caso //e pero en realidad no fue así, entonces no corre el programa