Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- treg_esquinas_bin= record
- id_esquina: integer;
- nombre_avenida1: string;
- nombre_avenida2: string;
- responsable: string;
- telefono: string;
- dir_mail: string;
- alta: boolean;
- end;
- treg_indice_esquinas= record
- pocicion: integer;
- fecha: tfecha;
- alta: boolean;
- existe: boolean;
- end;
- tvec_indice_esquinas= array[0..max] of treg_indice_esquinas;
- procedure crear_index_esquinas(var cesquinas_bin: arch_esquinas_bin;
- var cindice_esquinas: tvec_indice_esquinas; var cmax_logico_indice_esquinas: integer);
- var
- i,j: integer;
- aux_indice_esquinas: treg_indice_esquinas;
- aux_esquinas: treg_esquinas_bin;
- begin
- reset(cesquinas_bin);
- i:=-1;
- while (not eof(cesquinas_bin)) or (i<> max) do
- begin
- inc(i);
- read(cesquinas_bin,aux_esquinas);
- aux_indice_esquinas.pocicion:= i; //carga en el aux la pos
- aux_indice_esquinas.fecha:= aux_esquinas.fecha;//carga en el aux la fecha
- if (aux_esquinas.alta) then aux_indice_esquinas.alta := true
- else aux_indice_esquinas.alta :=false ; //carga en el aux el estado alta
- aux_indice_esquinas.existe:= true;
- cindice_esquinas[i]:=aux_indice_esquinas;//lo carga en el indice
- end;
- cmax_logico_indice_esquinas:= i;
- if(i<> max) then //si no llego al final... todo lo restante no existe .. le pongo false para saber su max logico
- for j:= i to max do
- begin
- aux_indice_esquinas.pocicion:= 999;
- aux_indice_esquinas.fecha:= aux_esquinas.fecha;//carga en el aux la fecha
- aux_indice_esquinas.alta :=false;
- aux_indice_esquinas.existe:=false;
- cindice_esquinas[j]:=aux_indice_esquinas;//lo carga en el indice
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement