1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
if communeAtraiter(p_c,d_c) then// création de la liste chaînée
begin
Assign(fs, Date_H_F); // function qui crée le nom du Fichier de ctl
Rewrite(fs);//écrasement de l'ancien
courant:=p_c;
while courant <> nil then
begin
if fichier_existe(courant^.nfcrs) then
begin
GetDate(an, mois, jour, j_s);//récupérer la date syst
GetTime(heure, minute, sec, sec100);// récupérer l'heure
// convertir en Date_Time
with DateT do
begin
year :=an;// tous word
month :=mois;
day := jour;
hour :=heure;
min :=minute;
sec := sec;
end;
PackTime(DateT, DateF);// convertir en longInt
Assign(f, courant^.nfcrs);
{$i-}reset(f); {$i+}
if ioresult=0 then SetFtime(f, DateF);
if dosError <> 0 then journal('_val_clas, creer_date_f, dos n° '+nb_ch (Doserror, 2,0));
close(f);
Dfic.nf := courant^.nfcrs;// mémorisation pour le F de ctl
Dfic.df := DateF;
write(fs, Dfic);
end;
end; // while
courant:=courant^.suiv;
close(fs);
end;
end; // creer_date_f |
Partager