Fichier listeschainees.jps — Modifié le 12 Janvier 2008 à 14 h 43

listeschainees.pdf
Source
%% auteur : 
%% gh
%% Illustration des listes chaînées

%% échelle et étendue de l'image
60 setxunit
-.5 5.5 setxrange
-.5 4.5 setyrange

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% définitions des couleurs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/coul0 {0 0 0 0.5 setcmykcolor} def %gris
/coul1 {noir} def
/coul2 {orange} def
/coul3 {rouge} def
/coul4 {bleu} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% les cases colorées
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/fillstyle {coul2 fill} def 
0 3 1 4 frame*
2 1.5 3 2.5  frame*
1 0 2 1 frame*
4 0 5 1 frame*

/fillstyle {coul3 fill} def 
1 3 2 4 frame*
3 1.5 4 2.5  frame*
2 0 3 1 frame*


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% les cadres de tableau
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

coul1
pointilles

0 0 5 0 droite
0 1 5 1 droite
0 1.5 5 1.5 droite
0 2.5 5 2.5 droite
0 3 5 3 droite
0 4 5 4 droite

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% les étiquettes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
coul0
<latex>
objet
</latex>
.5 3.5 [1 dup] uctexlabel
<latex>
pointeur
</latex>
1.5 3.5 [1 dup] uctexlabel
coul1
<latex>
$3$
</latex>
.5 3.5 [2.5 dup] dctexlabel

coul0
<latex>
objet
</latex>
2.5 2 [1 dup] uctexlabel
<latex>
pointeur
</latex>
3.5 2 [1 dup] uctexlabel
coul1
<latex>
$2$
</latex>
2.5 2 [2.5 dup] dctexlabel

coul0
<latex>
objet
</latex>
1.5 .5 [1 dup] uctexlabel
<latex>
pointeur
</latex>
2.5 .5 [1 dup] uctexlabel
coul1
<latex>
$1$
</latex>
1.5 .5 [2.5 dup] dctexlabel

coul0
<latex>
objet
</latex>
4.5 .5 [1 dup] uctexlabel
coul1
<latex>
NIL
</latex>
4.5 .5 [2 dup] dctexlabel

% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % %% les commentaires et flèches
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
coul4
continu
1.5 setlinewidth
/arrowscale {2.5 dup} def

% 2 3.5 2 2 pcangles

/armA 50 def
/armB -50 def
/angleA -60 def
/angleB -60 def

(A) node
() 2 3.5 cctext
(B) node
() 2 2 cctext
(A) (B) (->) ncdiag

(A) node
() 4 2 cctext
(B) node
() 1 .5 cctext
(A) (B) (->) ncdiag

/armA 0 def
/armB 0 def
/angleA 0 def
/angleB 0 def

(A) node
() 3 .5 cctext
(B) node
() 4 .5 cctext
(A) (B) (->) ncdiag