Bonjour,

Voici le code en entier tiré de recursive.developpez.com:
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
type tab           = array[0..6] of longint ;
 
const signe        : string[4]  = '+-*/' ;
      nombres      : tab        = (963,25,5,4,3,3,1) ;
 
var trouve,echange : boolean ;
    aa             : longint ;
    ii,jj          : integer ;
 
procedure operations(var t : tab ;max : integer) ;
var i,j1,j2 : integer ;
    a       : longint ;
    t1      : tab ;
begin
for i:=1 to 4 do
    for j1:=1 to max-1 do
        for j2:=j1+1 to max do
            begin
            case i of
               1 : a:=t[j1]+t[j2] ;
               2 : a:=t[j1]-t[j2] ;
               3 : a:=t[j1]*t[j2] ;
               4 : begin
                   a:=t[j1] div t[j2] ;
                   if t[j2]*a<>t[j1] then a:=0 ;
                   end ;
               end ;
            if a>0 then
               begin
               if a=t[0] then
                  begin
                  //gotoxy(1,8-max) ;write(t[j1],signe[i],t[j2],'=',a) ;
                  Form1.ListBox1.Items.Add(inttostr(t[j1])+signe[i]+inttostr(t[j2])+'='+inttostr(a));
                  trouve:=true ;exit ;
                  end ;
               move(t,t1,28) ;
               t1[j1]:=a ;t1[j2]:=0 ;
               repeat
                 echange:=false ;
                 for ii:=1 to max-1 do
                     if t1[ii]<t1[ii+1] then
                        begin
                        aa:=t1[ii] ;t1[ii]:=t1[ii+1] ;t1[ii+1]:=aa ;
                        echange:=true ;
                        end ;
               until not echange ;
               operations(t1,max-1) ;
               if trouve then
                  begin
                  //gotoxy(1,8-max) ;write(t[j1],signe[i],t[j2],'=',a) ;
                  Form1.ListBox1.Items.Add(inttostr(t[j1])+signe[i]+inttostr(t[j2])+'='+inttostr(a));
                  exit ;
                  end ;
               end ;
            end ;
end ;
 
 
 
procedure TForm1.Button1Click(Sender: TObject);
begin
     Screen.Cursor:=crHourGlass;
     trouve:=false ;
     ListBox1.Clear;
     Application.ProcessMessages;
     operations(nombres,6);
     Screen.Cursor:=crDefault;
end;
L'erreur:
[Error] Unit1.pas(92): Constant object cannot be passed as var parameter

Ne pensez pas que je cherche à ce que les autres résolvent mon exercice mais je plante vraiment sur cette erreur