Bonjour à tous,

J'ai une erreur de compilation pour un algorithme qui me semble bon.

voici le code :
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
--------------declaration---------------
with Ada.Text_Io;
use Ada.Text_Io;



procedure Exo3 is

   type T_Promotion is
         (L1,
          L2,
          L3,
          L4,
          L5);

   subtype T_Chaine_80 is String(1 .. 80);

   type T_Chaine is
      record
         La_Chaine   : T_Chaine_80;
         La_Longueur : Natural;
      end record;

   type T_Identite is
      record
         Le_Nom    : T_Chaine;
         Le_Prenom : T_Chaine;
      end record;

   type T_Eleve is
      record
         L_Identite   : T_Identite;
         La_Promotion : T_Promotion;
      end record;

   F : Ada.Text_Io.File_Type;

---------procedure a probleme-------------------------------
   procedure Lister_Fichier_Texte (
         Fichier : in Ada.Text_Io.File_Type) is
      Car : Character;

   begin
      Ada.Text_Io.Open(Fichier,Ada.Text_Io.In_File,"entree.txt"); --actual for "file" must be a variable     

     while not Ada.Text_Io.End_Of_File(Fichier) loop
         Ada.Text_Io.Get(Fichier,Car);
         Ada.Text_Io.Put(Car);
      end loop;

      Close(Fichier); --actual for "file" must be a variable   
end Lister_Fichier_Texte;

voila, merci d'avance