Ver Mensaje Individual
  #1  
Antiguo 17-12-2006
RJNewbyte RJNewbyte is offline
Registrado
 
Registrado: dic 2006
Posts: 3
Reputación: 0
RJNewbyte Va por buen camino
Question Tipos Incompatibles?

Hola a todos, estos son mis inicios en Delphi lo estoy aprendiendo por mi cuenta y bueno jeje imaginaros que lio .

Bueno el tema es que intento hacer un calculo de unos datos:
Código Delphi [-]
var
HI, MI, SI, MBI,HItoS, MItoS, SIT, SF, MBF, HF, H1, H2, H3, M1, M2, S1, S2: extended;
begin
  HI := StrToFloat (edit1.text) ;  //Horas Iniciales
  MI := StrToFloat (edit2.text);   //Minutos Iniciales
  SI := StrToFloat (edit3.Text);   //Segundos Iniciales
  MBI := StrToFloat (edit4.Text);  //Megas Iniciales
  MBF := StrToFloat (edit5.Text);  //Megas Finales
  HItoS := HI * 3600;              //Horas Iniciales a Segundos
  MItoS := MI * 60;                //Minutos Iniciales a segundos
  SIT := HItoS+MItoS+SI;           //Segundos Iniciales Totales
  SF := SIT * MBF /MBI;            //Segundos Finales
  HF := SF/3600;                 //Horas Finales
  H1 := SF div XXX;       //AQUI DA FALLO
  H2 := H1*3600;
  H3 := SF mod 3600;    // Y AQUI
  M1 := SF div 60;        //Y AQUI
  M2 := M1*60;
  S1 := H2+M2;
  S2 :=  SF-S1;
  Edit5.Text := FloatToStr (HF);
  Edit6.Text := FloatToStr (H1);
  Edit7.Text := FloatToStr (SIT);
  Edit8.Text := FloatToStr (SF);
  Edit9.Text := FloatToStr (HF);
end;


Pues en este codigo nose porque son incompatibles los datos con los operadores div y mod si alguien me lo pudiera explicar le estaria muy agradecido...suponiendo que ese sea el fallo claro....

Un Saludo
Responder Con Cita