Bonjour,
je travaille sur une matrice (en turbo pascal) 11*11 de type :
Code X : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
   A B C D E F G H I J
1  0 0 0 0 0 0 0 0 0 0 
2  0 0 0 0 0 0 0 0 0 0 
3  0 0 0 0 0 0 0 0 0 0
4  0 0 0 0 0 0 0 0 0 0
5  0 0 0 0 0 0 0 0 0 0
6  0 0 0 0 0 0 0 0 0 0
7  0 0 0 0 0 0 0 0 0 0
8  0 0 0 0 0 0 0 0 0 0
9  0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0
et j'aimerais que, lors de l'affichage, mes lettres A..B et mes chiffres 1..10 soient en bleu, et mes 0 en noir.
J'ai fait ça :
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
Procedure affiche(var tab:matrice);
var i,j:integer;
Begin
	For i:=0 to 10 do
	begin
		For j:=0 to 10 do
		begin
      textcolor(1);
			write(' '+tab[i][j]+' ');
		end;
		writeln;
		writeln;
	end; 
	For i:=1 to 10 do
	begin
		For j:=1 to 10 do
		begin
      textcolor(0);
			write(' '+tab[i][j]+' ');
		end;
		writeln;
		writeln;
	end;
end;
mais ça ne marche pas ... toute ma matrice se retrouve en bleu !
Pouvez-vous m'aider ?