Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Conexión con bases de datos

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 17-12-2006
RJNewbyte RJNewbyte is offline
Registrado
 
Registrado: dic 2006
Posts: 3
Poder: 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
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Libertad y negocios, incompatibles? marcoszorrilla Noticias 6 14-06-2005 22:01:35
TPanel y bucle incompatibles JoseQ Varios 1 03-03-2005 19:30:02
...tipos de sueldos.... Jure Humor 0 29-07-2004 15:28:25
Enviar archivo por socket. 'TStream' y 'TFileStream' Incompatibles. Sr_Sombrero Internet 6 01-07-2004 07:45:37
... 100 tipos... Jure Humor 0 18-03-2004 14:24:30


La franja horaria es GMT +2. Ahora son las 05:06:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi