Pseudocódigo/Diagramas de Flujo - AYUDA PARA LLENAR UNA TABLA

 
Vista:
sin imagen de perfil

AYUDA PARA LLENAR UNA TABLA

Publicado por monica (1 intervención) el 22/10/2013 23:34:16
HICE ESTE DIAGRAMA PARA HACER ESTRO:

CASO 1
HORA CODIGO NOMBRE
8:00 12 LAURA
9:00 13 MARIA

CASO 2
PERO NECESITO HACERLO AHORA ASI
HORA CODIGO NOMBRE
8:00 1 12 LAURA
8:00 2
8:00 3
9:00 1 12 LAURA
9:00 2
9:00 3
asi sucesivamente los que no tiene nombre ni codigo es por que no se les ha asignado pero necesito llenar cuando hay este asignado o no este asignado:

PARA EL CASO 1 LO HICE ASI

fila = 1
cita = false
intervalo = 60
if not ( HORAINI = Nulo) then
horacita = HORAINI
row = 2
if ( intervalo >0) then
(SELECT codigo, nombre FROM AGEN)
if (HORAINI = HORA FIN) then
while Compare (horacita,HORAINI) >= 0 and Compare (horacita,HORAFIN)+interval < 0
if (Recordcount>0) then
cita=false
for i= 0 hasta Recordcount-1
if ((compare(HORAINI,horacita)<0) and
(compare(HORAINI,horacita-interval)>0) or
(compare(HORAINI,horacita)=0) t hen
Cell(0,fila)=horacita
Cell(1,fila)=codigo
Cell(2,fila)=nombre
row = row + 1
fila = fila + 1
if ((compare(HORAINI,horacita)=0) then
cita = true
else
cita = false
if not (cita)
Cell(0,fila)=horacita
Cell(1,fila)=''
Cell(2,fila)=''
row = row + 1
fila = fila + 1
else
if not (cita)
Cell(0,fila)=horacita
Cell(1,fila)=''
Cell(2,fila)=''
row = row + 1
fila = fila + 1
horacita = horacita + interval
else 'no hay fecha'
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder