Après ce sujet , je cherche à faire un tableau du style

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
 
type
  TERROR   = Class(Exception);
  EERROR1  = Class(TERROR);
  EERROR2  = Class(TERROR);
 
  TErrors  = record
    I : integer;
    M : String;
    ERR :TERROR;
 
end;
 
const
  CMESSAGE1 = 'un';
  CMESSAGE2 = 'deux';
 
var
 
    TBERROR : array [1..47] of TErrors =
  (
    (I:100;M:CMESSAGE100;ERR:EERROR1)
   ,(I:101;M:CMESSAGE101;ERR:EERROR2)
   );
En fait, je me retrouve avec l'erreur suivante (au niveau du EERRO1 dans la définition du tableau TBERROR) :

E2010 Types incompatibles : 'THTTPERROR' et 'Class reference'
Et la, je sèche

J'ai testé aussi de la manière suivante :

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
 
type
  TERROR   = Class(Exception);
 // EERROR1  = Class(TERROR);
  EERROR2  = Class(TERROR);
 
  TErrors  = record
    I : integer;
    M : String;
    ERR :TERROR;
 
end;
 
const
  CMESSAGE1 = 'un';
  CMESSAGE2 = 'deux';
 
var
  EERROR1 : TERROR;
 
    TBERROR : array [1..47] of TErrors =
  (
    (I:100;M:CMESSAGE100;ERR:EERROR1)
   ,(I:101;M:CMESSAGE101;ERR:EERROR2)
   );
et j'ai eu le message d'erreur suivant :

E2026 Expression constante attendue
Si quelqu'un a une idée, je suis preneur