Bonjour

J'ai un projet de gestion d'un fichier : des cartes âge, groupe sanguin o+ | ab| o-, etc.
Voilà, je ne sais pas où je me suis leurré, aidez-moi svp.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  program  fichier;
uses crt;
label a;
const
n=5;
type
groupage=record
      nom,prenom,adresse:string;
      age:integer;
      group:char;
         end;
 gp=record
  nom,prenom,adresse:string;
  age:integer;
  group:char;
  end;
Ttab=array[1..n]of string;
var
f_group:file of groupage;
vf:groupage;
ch:char;
T2:Ttab;
procedure creation;
  begin
  textbackground(red);
  clrscr;
rewrite(f_group);
close(f_group);
  end;
procedure consultation;
var
A,B,O:gp;
T1:array[1..10] of gp;
i,n:integer;
begin
textbackground(green);
assign(f_group,'fatma.dat');
reset(f_group);
while(not eof(f_group))do
  for i:=1 to n do
   with T1[i] do
    begin
      writeln('nom:',nom);textbackground(blue);writeln('                   ');
      textbackground(green);
      writeln('prenom:',prenom);textbackground(blue);writeln('                 ');
      textbackground(white);
      writeln('adresse:',adresse);textbackground(blue);writeln('               ');
      textbackground(green);
      writeln('age:',age);textbackground(blue);writeln('                 ');
      textbackground(blue);
      writeln('group:',group);textbackground(blue);writeln('                ');
      textbackground(green);
      close(f_group);
      end;
      end;
 
procedure modification;
var
 i,n,k:integer;ad:string;T2:Ttab;
 begin
 textbackground(black);
 assign(f_group,'fatma.dat');
 reset(f_group);
  while(not eof(f_group))do
  begin
  for i:=1 to n do
  writeln('T2[',i,']');readln(T2[i]);
   writeln('la modification de fichier est ');
        writeln('l''adresse qui veut chander =');readln(ad);
        writeln(' la rang = ');readln(k);
        T2[k]:=ad;
  for i:=1 to n do
    consultation;
 end;
 close(f_group);
end;
procedure quitter;
  begin
 
  end;
 procedure menu;
 begin
 assign(f_group,'fatma.dat');
 begin
   writeln('{1}:=creation ');
   writeln('{2}:=modification ');
   writeln('{3}:=supression ');
   writeln('{4}:=consultation ');
   writeln('{5}:=quitter ');
   end;
   end;
      begin
      clrscr;
 a:menu;
writeln('entrer les choix= ');readln(ch);
case (ch) of
  '1' :creation;
  '2' :modification;
  '4' :consultation;
  '5' :quitter;
  else
   writeln('take your attantion ');
   end;
   if ch='5' then
   exit
   else
   goto a ;
    readkey ;
    end.