Bonjour,

voici un truc bizarre
Je reçois une erreur "Range Stack Error"


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
procedure TForm1.Button4Click(Sender: TObject);
var
  T : array[1..15,1..15] of string;
  L,c : byte;
begin
  For C:=5 to 10 do
    T[7,C]:='A';
 
 for L := 1 to 15 do
  begin
  For C := 1 to 15  do
   begin
    if T[l,c] <>'' then
      begin
        if L>1 then // Haut
          if T[L-1,C] = '' then T[L-1,C]  :=  '?';
        if L<15 then // Bas
          if T[L+1,C] = '' then T[L+1,C]  :=  '?';
        if C>1 then // Gauche
          if T[L,C-1] = '' then T[L,C-1]  :=  '?';
        if C>1 then // Droite
          if T[L,C+1] = '' then T[L,C+1]  :=  '?'; <= error
      end;
  end;
 
end;
L contient quand l'erreur est généré L='','','','','','' // pas mal pour un byte