Tema: uso de case
Ver Mensaje Individual
  #8  
Antiguo 17-10-2011
juaarias juaarias is offline
Miembro
NULL
 
Registrado: nov 2010
Posts: 50
Reputación: 0
juaarias cantidad desconocida en este momento
case dentro de case?

hola gente queria consultarles sobre donde esta el error en el siguiente codigo:
//calculo estadia
Código Delphi [-]
case cmbCantidad.ItemIndex  of
    (0):begin
        case a of
        (a<7):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*750);
        (a=7):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*4900);
        (a=15):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*8000);
        end;

    (1):begin
        case a of
        (a<7)frmFactura.stgFactura.Cells[2,0]:= inttostr(a*750));
        (a=7):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*4900);
        (a=15):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*8000);
        end;
    (2):begin
        case a of
        (a<7)frmFactura.stgFactura.Cells[2,0]:= inttostr(a*750));
        (a=7):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*4900);
        (a=15):frmFactura.stgFactura.Cells[2,0]:= inttostr(a*8000);
    end;
    end;
    end;
    end;
    end;
Responder Con Cita