Einzelnen Beitrag anzeigen

Gehstock

Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
 
Delphi 2007 Professional
 
#6

Re: Wie kann ich das rechnen

  Alt 2. Aug 2006, 20:30
daten := IntToStr((cb_ring1.ItemIndex*10) + cb_ring2.ItemIndex); klappt einwandfre

nächstes problem

prozentrechnung

Delphi-Quellcode:
if StrTofloat(wiederstand)<1000 then begin
pnl_result.caption := (floattostr((strtofloat(wiederstand)/ ///wiederstand ist ne variable
1))+' Ohm');// der genaue wert
pnl_worstcasemin.caption := (floattostr((strtofloat(wiederstand)/
???????))+' Ohm');// der minimale wert
pnl_worstcasemax.caption := (floattostr((strtofloat(wiederstand)/
???????))+' Ohm');// der maximale wert

end;

if rb_4rings.Checked then begin
if cb_ring4.ItemIndex = 0 then pnl_Tolerance.Caption:= '10%'; // und hier sind die toleranzen
if cb_ring4.ItemIndex = 1 then pnl_Tolerance.Caption:= '5%' ;
if cb_ring4.ItemIndex = 2 then pnl_Tolerance.Caption:= '1%' ;
if cb_ring4.ItemIndex = 3 then pnl_Tolerance.Caption:= '2%' ;
if cb_ring4.ItemIndex = 4 then pnl_Tolerance.Caption:= '0,5%';
if cb_ring4.ItemIndex = 5 then pnl_Tolerance.Caption:= '0,25%';
if cb_ring4.ItemIndex = 6 then pnl_Tolerance.Caption:= '0,1%'  ;
end;
if rb_5rings.Checked then begin
if cb_ring55.ItemIndex = 0 then pnl_Tolerance.Caption:= '5%';
if cb_ring55.ItemIndex = 1 then pnl_Tolerance.Caption:= '1%' ;
if cb_ring55.ItemIndex = 2 then pnl_Tolerance.Caption:= '2%' ;
if cb_ring55.ItemIndex = 3 then pnl_Tolerance.Caption:= '0,5%' ;
if cb_ring55.ItemIndex = 4 then pnl_Tolerance.Caption:= '0,25%';
if cb_ring55.ItemIndex = 5 then pnl_Tolerance.Caption:= '0,1%';
end;
end;
Marcel
  Mit Zitat antworten Zitat