Ver Mensaje Individual
  #16  
Antiguo 10-03-2007
keikurono keikurono is offline
Miembro
 
Registrado: mar 2007
Posts: 16
Reputación: 0
keikurono Va por buen camino
La nota es que es muy larga porque siempre repito este codigo en los 4 botones (+, -, *, /)
Código SQL [-]
 if B[1,2]='+' then
             B[1,1]:=floattostr(strtofloat(B[1,1])+strtofloat(B[2,1]));
        if B[1,2]='-' then
             B[1,1]:=floattostr(strtofloat(B[1,1])-strtofloat(B[2,1]));
        if B[1,2]='*' then
             B[1,1]:=floattostr(strtofloat(B[1,1])*strtofloat(B[2,1]));
        if B[1,2]='/' then
             if B[2,1]<>'0' then
                  B[1,1]:=floattostr(strtofloat(B[1,1])/strtofloat(B[2,1]))
             else
                  MESSAGEDLG('EL DIVIDENDO DEVE DE SER DISTINTO DE CERO',mTInformation,[mbok],0);

Alguien save eso de como utilizar en un project como estos, eso de prosedimiento ???, por que con eso se acortaria mejor .
Responder Con Cita