Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 18-11-2009
gerardus gerardus is offline
Miembro
 
Registrado: dic 2007
Posts: 43
Poder: 0
gerardus Va por buen camino
Seria más elegante y más claro:


Código:
var    
  i: integer;  
begin   
i :=  qryPagosIdTipPag2.Value ;
case i of     
  1: qrPro0.memReportePagos.Value   := StrToFloat(lo_s);     
  2: qrPro0.memReportePagos2.Value   := StrToFloat(lo_s)
  3: qrPro0.memReportePagos3.Value   := StrToFloat(lo_s)
  4: qrPro0.memReportePagos4.Value   := StrToFloat(lo_s)
  5: qrPro0.memReporteServFac.Value  := StrToFloat(lo_s); 
end; //case   
qrPro0.memReporte.Post;qrPro0.memReporte.Post;
Si el valor 1 y2 dan el mismo resultado, sería:

Código:
var    
  i: integer;  
begin   
i :=  qryPagosIdTipPag2.Value ;
case i of     
  1,2: qrPro0.memReportePagos.Value   := StrToFloat(lo_s);     
  3: qrPro0.memReportePagos3.Value   := StrToFloat(lo_s)
  4: qrPro0.memReportePagos4.Value   := StrToFloat(lo_s)
  5: qrPro0.memReporteServFac.Value  := StrToFloat(lo_s); 
end; //case   
qrPro0.memReporte.Post;qrPro0.memReporte.Post;
Y como bien dice JosepGA te sobra un end

Saludos,

Gerard.

Última edición por gerardus fecha: 18-11-2009 a las 10:20:38.
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
Instalar Ayuda (.HLP) en la Ayuda de Delphi? MasterXP Varios 6 12-04-2006 06:57:49
Ayuda para crear ayuda... Gabriel2 Varios 2 10-06-2005 00:15:18
Leer la ayuda... Ayuda! MaJeSTiC Varios 0 04-08-2004 21:24:42
ayuda con strtofloat, ayuda punto flotante TURING Varios 5 30-04-2004 08:03:59
Ayuda Con Instalacion De Archivos De Ayuda Legolas Varios 1 01-12-2003 14:48:03


La franja horaria es GMT +2. Ahora son las 02:11:34.


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