Цикл не работает...?
Код:
lmbd:= StrToInt(Edit1.Text);
Tk:= StrToInt(Edit24.Text)*60*60;
Vr_mashin_obsh:= StrToInt(Edit5.Text);
Scale:= Tk/Vr_mashin_obsh;
Delt:= StrToInt(Edit6.Text);
Delt_m:= 60*Delt/Scale;
Kl1_post:=0;
Kl2_post:=0;
Kl1_ochered:=0;
Kl2_ochered:=0;
Vremya_tekyshee:=0;
Vremya_obsl1:= 0;
Vremya_obsl2:=0;
if Edit2.Text='2' then
begin
repeat
Vremya_tekyshee:= Vremya_tekyshee+Delt_m;
Kol_post:= Kolichestvo(lmbd);
if (Kl1_ochered > Kl2_ochered) or (Kl1_ochered = Kl2_ochered) then
begin
Kl2_ochered:= Kl2_ochered+Kol_post;
if Vremya_tekyshee > Vremya_obsl1 then
begin
Kl2_post:= Kl2_post + 1;
Kl2_ochered:= Kl2_ochered - 1;
Vr_obsl1:= Vremya_obslugivania(StrToInt(Edit3.Text)/Scale, 15/Scale);
Vr_obsl2:= Vremya_obslugivania(StrToInt(Edit4.Text)/Scale, 20/Scale);
Vremya_obsl1:= Vr_obsl1 + Vr_obsl2 + Vremya_tekyshee;
end
end
else
begin
Kl1_ochered:= Kl1_ochered+Kol_post;
if Vremya_tekyshee > Vremya_obsl2 then
begin
Kl1_post:= Kl1_post + 1;
Kl1_ochered:= Kl1_ochered - 1;
Vr_obsl1:= Vremya_obslugivania(StrToInt(Edit3.Text)/Scale, 15/Scale);
Vr_obsl2:= Vremya_obslugivania(StrToInt(Edit4.Text)/Scale, 20/Scale);
Vremya_obsl2:= Vr_obsl1 + Vr_obsl2 + Vremya_tekyshee;
end
end;
until Vremya_tekyshee > Vr_mashin_obsh;
end;
Цикл repeat until явно не работает почему-то. Наращивание Vremya_tekyshee не происходит.
ПОчему? Подскажите, плиз
Последний раз редактировалось Иринкаа, 16.11.2007 в 22:06.
|