Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-06-2008
atirukas atirukas is offline
Registrado
 
Registrado: jun 2008
Posts: 4
Poder: 0
atirukas Va por buen camino
Delphi no me reconoce instrucciones

Hola soy nueva programando con delphi, estoy realizando un programa en delphi 7 y no me ejecuta una instruccion q es sencilla c:=c+1; no se si la estoy colocando mal o q es lo q pasa pongo un fragmento del codigo q utilizo
while(fecha <= datetimepicker2.Date)do begin
if c<=5 then begin
for d:=0 to i do begin
if fecha =nohabil[d] then
j:=1; break;
end;
if j=0 then begin
year[r][c]:=fecha;
fecha:=fecha+1;
end
else begin
fecha:=fecha+1;
end;
c:=c+1;
end
else
fecha:=fecha+1;
r:=r+1;
c:=0;
listbox1.Clear;
end;

no se donde este el error, c es un valor entero. Espero alguien pueda ayudarme. de antemano muchas gracias.
Responder Con Cita
  #2  
Antiguo 16-06-2008
Avatar de enecumene
[enecumene] enecumene is offline
Miembro de Oro
 
Registrado: may 2006
Ubicación: Santo Domingo, Rep. Dom.
Posts: 3.040
Poder: 21
enecumene Va por buen camino
Hola, por favor trata de usar las etiquetas delphi para que tus codigos se vean mas claro como se ve a continuación:

Código Delphi [-]
while(fecha <= datetimepicker2.Date)do begin
      if c<=5 then begin
          for d:=0 to i do begin
            if fecha =nohabil[d] then
            j:=1; break;
          end;
          if j=0 then begin
            year[r][c]:=fecha;
            fecha:=fecha+1;
          end
          else begin
            fecha:=fecha+1;
          end;
          c:=c+1;
      end
      else
        fecha:=fecha+1;
        r:=r+1;
        c:=0;
    listbox1.Clear;
    end;

Saludos.
__________________

Mi BLOG - ¡Joder, leanse la guia de estilo!
Las Palabras son enanas, los ejemplos gigantes.
Responder Con Cita
  #3  
Antiguo 16-06-2008
atirukas atirukas is offline
Registrado
 
Registrado: jun 2008
Posts: 4
Poder: 0
atirukas Va por buen camino
Smile

ah ok gracias, de todas formas ya resolvi el problema.
Responder Con Cita
  #4  
Antiguo 16-06-2008
Avatar de enecumene
[enecumene] enecumene is offline
Miembro de Oro
 
Registrado: may 2006
Ubicación: Santo Domingo, Rep. Dom.
Posts: 3.040
Poder: 21
enecumene Va por buen camino
Cita:
Empezado por atirukas Ver Mensaje
ah ok gracias, de todas formas ya resolvi el problema.
¡Vale!, ¡Qué buena noticia!, ¿y no crees que deberías postear la solución en caso de que aparezca otra persona con tu mismo problema?.

Saludos.
__________________

Mi BLOG - ¡Joder, leanse la guia de estilo!
Las Palabras son enanas, los ejemplos gigantes.
Responder Con Cita
  #5  
Antiguo 16-06-2008
atirukas atirukas is offline
Registrado
 
Registrado: jun 2008
Posts: 4
Poder: 0
atirukas Va por buen camino
perdon es q soy nueva en esto, pero aqui les dejo la solución. Bien la solucion fue sencila lo q hacia era q le asignaba un valor inicial a c antes de comenzar el while, la solución fue cambiar esas instrucciones dentro de while y borra la instruccion c:=c+1; Entonces me quedó así;


Código Delphi [-]
while(fecha <= datetimepicker2.Date)do begin
dia:=LongDayNames[DayOfWeek(fecha)];
if dia='Lunes' then c:=0;
if dia='Martes'then c:=1;
if dia='Miércoles'then c:=2;
if dia='Jueves'then c:=3;
if dia='Viernes'then c:=4;
if dia='Sábado'then c:=5;
if dia='Domingo'then c:=6;
if c <= 5 then begin
for d:=0 to i do begin
if fecha =nohabil[d] then begin
j:=1;
break;
end;
end;
if j=0 then begin
year[r][c]:=fecha;
fecha:=fecha+1;
end
else begin
year[r][c]:= strtodate('30/12/1899');
fecha:=fecha+1;
j:=0;
end;
end;
if c = 6 then begin
fecha:=fecha+1;
r:=r+1;
end;
end;



Bueno eso es todo.
Responder Con Cita
  #6  
Antiguo 16-06-2008
atirukas atirukas is offline
Registrado
 
Registrado: jun 2008
Posts: 4
Poder: 0
atirukas Va por buen camino
perdon es q soy nueva en esto, pero aqui les dejo la solución. Bien la solucion fue sencila lo q hacia era q le asignaba un valor inicial a c antes de comenzar el while, la solución fue cambiar esas instrucciones dentro de while y borra la instruccion c:=c+1; Entonces me quedó así;




Código Delphi [-]
while(fecha <= datetimepicker2.Date)do begin
dia:=LongDayNames[DayOfWeek(fecha)];
if dia='Lunes' then c:=0;
if dia='Martes'then c:=1;
if dia='Miércoles'then c:=2;
if dia='Jueves'then c:=3;
if dia='Viernes'then c:=4;
if dia='Sábado'then c:=5;
if dia='Domingo'then c:=6;
if c <= 5 then begin
for d:=0 to i do begin
if fecha =nohabil[d] then begin
j:=1;
break;
end;
end;
if j=0 then begin
year[r][c]:=fecha;
fecha:=fecha+1;
end
else begin
year[r][c]:= strtodate('30/12/1899');
fecha:=fecha+1;
j:=0;
end;
end;
if c = 6 then begin
fecha:=fecha+1;
r:=r+1;
end;
end;







Bueno eso es todo
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
Instalo SQL Server 2000 pero el Delphi no lo reconoce.... Roilo MS SQL Server 4 17-05-2007 16:45:42
Transacciones a través de Instrucciones Sql TelloClos Conexión con bases de datos 16 11-05-2006 00:19:20
Formularios e instrucciones SQL Jayle Tablas planas 1 13-04-2005 19:35:00
...instrucciones... Jure Humor 4 22-10-2004 00:27:02
Capturar instrucciones buitrago Firebird e Interbase 1 13-12-2003 01:16:32


La franja horaria es GMT +2. Ahora son las 22:35:37.


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