program TRI; begin pref iiuwgraph block begin pref mouse block (*************************************************************************) (* PROGRAMME DE COMPARAISON *) (* DE DEUX METHODES DE TRIS SUR DES ELEMENTS DIFFERENTS *) (*************************************************************************) (**************************************************************************) (* PROCEDURES DE GRAPHISMES *) (**************************************************************************) UNIT RECTANGLE_PLEIN : procedure(x_h,y_h,x_b,y_b, coul,contour:integer); var i : integer ; BEGIN call color (coul); for i:= y_h to y_b do call move (x_h,i); call hfill (x_b); od; call color (contour); call move(x_h,y_h); call draw(x_b,y_h); call draw(x_b,y_b); call draw(x_h,y_b); call draw(x_h,y_h); END RECTANGLE_PLEIN; UNIT RECTANGLE_HISTO : procedure(x_h,y_h,x_b,y_b, coul:integer); var i : integer ; BEGIN call color (coul); for i:= x_h to x_b do call move (i,y_h); call vfill (y_b); od; END RECTANGLE_HISTO; UNIT RECTANGLE: procedure(x_h,y_h,x_b,y_b:integer); BEGIN call move(x_h,y_h); call draw(x_b,y_h); call draw(x_b,y_b); call draw(x_h,y_b); call draw(x_h,y_h); END RECTANGLE; (************************************************************************) (* IMPLEMENTATION DE LA STRUCTURE DE DONNEES *) (* m‚thode utilis‚e : h‚ritage *) (************************************************************************) (********************************************************) (* CLASSE SUPERIEURE *) (********************************************************) unit STR_ELEMENTS : class; unit virtual randomize : procedure; end randomize; unit virtual trace : procedure (e,y : integer); end trace; unit virtual echange : procedure (e1,e2,y : integer); end echange; unit virtual compare : function (e1,e2 : integer) : integer; end compare; unit virtual copie : procedure (T : STR_ELEMENTS); end copie; unit virtual killtab : procedure; end killtab; end STR_ELEMENTS; (********************************************************) (* CLASSE INFERIEURE *) (********************************************************) (********************************************************) (* CLASSE HISTOGRAMME *) (********************************************************) unit HISTOGRAMMES : STR_ELEMENTS class (nb_elements : integer); unit ENR_ELEMENTS : class; var couleur : integer, valeur : integer; end ENR_ELEMENTS; var TAB : arrayof ENR_ELEMENTS, i : integer ; unit virtual randomize : procedure; var i : integer; begin for i := 0 to nb_elements-1 do TAB(i).valeur := (random*100)+1; TAB(i).couleur := tab(i).valeur div 10+1; if(TAB(i).couleur>=6)then TAB(i).couleur:= TAB(i).couleur +3; fi; od; end randomize; unit virtual trace : procedure (e,y : integer); var larg : integer; begin larg := 600 div nb_elements; call RECTANGLE_HISTO (15+e*larg,y-TAB(e).valeur,15+(e+1)*larg-2,y, TAB(e).couleur); end trace; unit virtual echange : procedure (e1,e2,y : integer); var tmp1,tmp2,coul1,h2,larg : integer; begin larg := 600 div nb_elements; call RECTANGLE_HISTO (15+e1*larg,y-100,15+(e1+1)*larg-2,y,7); call RECTANGLE_HISTO (15+e2*larg,y-100,15+(e2+1)*larg-2,y,7); h2 := TAB(e2).valeur; tmp1 := TAB(e1).valeur; tmp2 := TAB(e1).couleur; TAB(e1).valeur := TAB(e2).valeur; TAB(e1).couleur := TAB(e2).couleur; TAB(e2).valeur := tmp1; TAB(e2).couleur := tmp2; coul1 := TAB(e1).couleur; call RECTANGLE_HISTO (15+e1*larg,y-h2,15+(e1+1)*larg-2,y, coul1); call RECTANGLE_HISTO (15+e2*larg,y-tmp1,15+(e2+1)*larg-2,y, tmp2); end echange; unit virtual compare : function (e1,e2 : integer) : integer; begin if TAB(e1).valeur < TAB(e2).valeur then result := -1; else if TAB(e1).valeur = TAB(e2).valeur then result := 0; else result := 1; fi; fi; end compare; unit virtual copie : procedure ( T : HISTOGRAMMES); var i : integer; begin for i := 0 to nb_elements-1 do TAB(i).valeur := T.tab(i).valeur; TAB(i).couleur := T.tab(i).couleur; od; end copie; unit virtual killtab : procedure; var i : integer; begin for i:=0 to nb_elements-1 do kill (TAB(i)); od; end killtab; begin array TAB dim (0:nb_elements-1); for i:=0 to nb_elements-1 do TAB(i) := new ENR_ELEMENTS; od; end HISTOGRAMMES; (********************************************************) (* CLASSE SURFACES *) (********************************************************) unit SURFACES : STR_ELEMENTS class (nb_elements : integer); unit ENR_ELEMENTS : class; var couleur : integer, longueur: integer, largeur : integer; end ENR_ELEMENTS; var TAB : arrayof ENR_ELEMENTS, i : integer ; unit virtual randomize : procedure; var i,largeur_max,surf_interne : integer; begin for i := 0 to nb_elements-1 do largeur_max := 25; TAB(i).longueur := (random*largeur_max)+1; TAB(i).largeur := (random * largeur_max)+1; surf_interne := TAB(i).longueur * TAB(i).largeur; TAB(i).couleur := (surf_interne * 12) div (largeur_max*largeur_max)+1; if(TAB(i).couleur>=6)then TAB(i).couleur:= TAB(i).couleur +3; fi; od; end randomize; unit virtual trace : procedure (e,y : integer); var larg,xx,yy : integer; begin larg := 25; xx := (e mod 20)*30+30; yy := y - 90 + (e div 20 )*30; call RECTANGLE_HISTO (xx-(tab(e).largeur div 2), yy-(tab(e).longueur div 2), xx+((TAB(e).largeur+1) div 2), yy+((TAB(e).longueur+1) div 2),TAB(e).couleur); end trace; unit virtual echange : procedure (e1,e2,y : integer); var xx1,yy1,xx2,yy2,tmp1,tmp2,tmp3,coul1,h2long, h2larg,larg : integer; begin larg := 25; xx1 := (e1 mod 20)*30+30; yy1 := y - 90 + (e1 div 20 )*30; xx2 := (e2 mod 20)*30+30; yy2 := y - 90 + (e2 div 20 )*30; call RECTANGLE_HISTO (xx1-(tab(e1).largeur div 2), yy1-(tab(e1).longueur div 2), xx1+((TAB(e1).largeur+1) div 2), yy1+((TAB(e1).longueur+1) div 2),7); call RECTANGLE_HISTO (xx2-(tab(e2).largeur div 2), yy2-(tab(e2).longueur div 2), xx2+((TAB(e2).largeur+1) div 2), yy2+((TAB(e2).longueur+1) div 2),7); h2larg := TAB(e2).largeur; h2long := TAB(e2).longueur; tmp1 := TAB(e1).largeur; tmp2 := TAB(e1).longueur; tmp3 := TAB(e1).couleur; TAB(e1).largeur := TAB(e2).largeur; TAB(e1).longueur := TAB(e2).longueur; TAB(e1).couleur := TAB(e2).couleur; TAB(e2).largeur := tmp1; TAB(e2).longueur := tmp2; TAB(e2).couleur := tmp3; coul1 := TAB(e1).couleur; call RECTANGLE_HISTO (xx1-(h2larg div 2), yy1-(h2long div 2), xx1+((h2larg+1) div 2), yy1+((h2long+1) div 2),coul1); call RECTANGLE_HISTO (xx2-(tmp1 div 2), yy2-(tmp2 div 2), xx2+((tmp1+1) div 2), yy2+((tmp2+1) div 2),tmp3); end echange; unit virtual compare : function (e1,e2 : integer) : integer; var surf1,surf2 : integer; begin surf1 := TAB(e1).largeur * TAB(e1).longueur; surf2 := TAB(e2).largeur * TAB(e2).longueur; if surf1 < surf2 then result := -1; else if surf1 = surf2 then result := 0; else result := 1; fi; fi; end compare; unit virtual copie : procedure ( T : SURFACES); var i : integer; begin for i := 0 to nb_elements-1 do TAB(i).largeur := T.tab(i).largeur; TAB(i).longueur := T.tab(i).longueur; TAB(i).couleur := T.tab(i).couleur; od; end copie; unit virtual killtab : procedure; var i : integer; begin for i:=0 to nb_elements-1 do kill (TAB(i)); od; end killtab; begin array TAB dim (0:nb_elements-1); for i:=0 to nb_elements-1 do TAB(i) := new ENR_ELEMENTS; od; end SURFACES; (********************************************************) (* CLASSE POLYNOME *) (********************************************************) unit POLY : STR_ELEMENTS class (nb_elements : integer); unit ENR_ELEMENTS : class; var coeff : arrayof integer, degre : integer; end ENR_ELEMENTS; var TAB : arrayof ENR_ELEMENTS, i : integer , x : integer ; unit CAL_POLYNOME : function (indice : integer): integer; var somme,i : integer; begin somme := TAB(indice).coeff(TAB(indice).degre); i := TAB(indice).degre - 1; while (i>=0) do somme := somme * x +TAB(indice).coeff(i); i := i -1; od; result := somme; end CAL_POLYNOME; unit virtual randomize : procedure; var i,j,deg,valeur,test : integer; begin for i := 0 to nb_elements-1 do deg := (random * 5) + 1; x := (random * 7) + 1; TAB(i).degre := deg; test := 0; while (test = 0) do for j := 0 to deg do TAB(i).coeff(j) := random*9 - 4; test := TAB(i).coeff(j) + test; od; od; od; call AFFICHE_INFO; end randomize; unit affchar : procedure (n : integer); begin case n when 0 : call outstring ("0"); when 1 : call outstring ("1"); when 2 : call outstring ("2"); when 3 : call outstring ("3"); when 4 : call outstring ("4"); when 5 : call outstring ("5"); when 6 : call outstring ("6"); when 7 : call outstring ("7"); when 8 : call outstring ("8"); when 9 : call outstring ("9"); esac; end; unit AFFICHE_INFO : procedure ; begin call color (15); call move (520,160); call outstring ("VALEUR X : "); call affchar(x); call move (520,335); call outstring ("VALEUR X : "); call affchar(x); call color (8); call move (521,161); call outstring ("VALEUR X : "); call affchar(x); call move (521,336); call outstring ("VALEUR X : "); call affchar(x); call color (4); call RECTANGLE (8,5,12,85); call move (8,85); call draw (4,85); call draw (10,90); call draw (16,85); call draw (12,85); call RECTANGLE (8,180,12,259); call move (8,259); call draw (4,259); call draw (10,264); call draw (16,259); call draw (12,259); end ; unit virtual trace : procedure (e,y : integer); var xx,yy,i,nbchar : integer, debut : boolean; begin xx := (e div 10)*320+20; yy := y-100+(e mod 10)*8; call move (xx,yy); nbchar := 0; debut := true; for i:=TAB(e).degre downto 0 do if tab(e).coeff(i)<>0 then if TAB(e).coeff(i)<0 then call outstring ("-"); nbchar := nbchar + 1; else if not debut then call outstring ("+"); nbchar := nbchar + 1; fi; fi; debut := false; if ((tab(e).coeff(i)<>1) and (tab(e).coeff(i)<>-1)) or (i=0) then if tab(e).coeff(i)>=0 then call affchar (TAB(e).coeff(i)); else call affchar (-TAB(e).coeff(i)); fi; nbchar := nbchar + 1; fi; if i<>0 then call outstring ("X"); if i<>1 then call outstring ("^"); call affchar (i); nbchar := nbchar + 2; fi; nbchar := nbchar + 1; fi; fi; od; for i:=nbchar to 25 do call outstring (" "); od; end trace; unit virtual echange : procedure (e1,e2,y : integer); var i ,sauve_degre,sauve_coef : integer; begin sauve_degre := TAB(e2).degre; TAB(e2).degre := TAB(e1).degre; TAB(e1).degre := sauve_degre; for i := 5 downto 0 do sauve_coef := TAB(e2).coeff(i); TAB(e2).coeff(i) := TAB(e1).coeff(i); TAB(e1).coeff(i) := sauve_coef; od; call trace (e1,y); call trace (e2,y); end echange; unit virtual compare : function (e1,e2 : integer) : integer; var val1,val2 : integer; begin val1 := CAL_POLYNOME(e1); val2 := CAL_POLYNOME(e2); if val1=0) do call RECTANGLE (x1+k,y1+k,x2-k,y2-k); i := i+1; j := j+1; k := k-1; od; call color (c3); call RECTANGLE (x1,y1,x2,y2); end EFFACE; UNIT BOX_MESSAGE : function (chaine:string;x1,y1,x2,y2:integer): boolean ; VAR succes,gauche,droit,centre : boolean, x,y,p,i:integer; BEGIN succes := false; call BOUTON (x1,y1,x2,y2,7,9,1); call move (x1+20,y1+30); call outstring (chaine); call BOUTON (x1+80,y2-50,x1+150,y2-15,7,15,8); call BOUTON (x1+200,y2-50,x1+270,y2-15,7,15,8); call move (x1+94,y2-35); call color (4); call outstring ("O U I"); call move (x1+214,y2-35); call outstring ("N O N "); do call showcursor; call getpress (0,x,y,p,gauche,droit,centre); if (gauche) then call hidecursor; if (x > (x1+80) and x < (x1 + 150) and y>(y2-50) and y<(y2-15)) then call BOUTON (x1+80,y2-50,x1+150,y2-15,7,8,15); call move (x1+90,y2-35); call color (8); call outstring ("O U I"); call delai (2000); call move (x1+90,y2-35); call color (8); call outstring ("O U I"); call BOUTON (x1+80,y2-50,x1+150,y2-15,7,15,8); call move (x1+90,y2-35); call color (8); call outstring ("O U I"); succes := true; exit ; fi; if (x>(x1+200) and x<(x1+270) and y>(y2-50) and y<(y2-15)) then call BOUTON (x1+200,y2-50,x1+270,y2-15,7,8,15); call color (8); call move (x1+210,y2-35); call outstring ("N O N "); call delai (2000); call move (x1+210,y2-35); call outstring ("N O N "); call BOUTON (x1+200,y2-50,x1+270,y2-15,7,15,8); call color (8); call move (x1+210,y2-35); call outstring ("N O N "); exit; fi; call showcursor; fi; od; result := succes; END BOX_MESSAGE; unit carre : procedure (x,y : integer); begin call RECTANGLE_PLEIN (x,y,x+39,y+31,7,15); call color (15); call move (x,y+29); call draw (x,y); call draw (x+37,y); call color (8); call draw (x+37,y+29); call draw (x+1,y+29); call color (8); call move (x+38,y+3); call draw (x+38,y+30); call draw (x+3,y+30); end; unit eff_titre : procedure; var f : file, i,j : integer, n : integer, col : integer, A : arrayof char, map : arrayof integer, c : char; begin for i:=5 to 10 do for j:=0 to 1 do call carre (i*40,j*32); od; od; end eff_titre; unit tracev : procedure (x,y2,y1 : integer); begin call move (x,y1); call vfill (y2); end tracev; unit dessinstat : procedure (x,y,c : integer); begin call color (c); call tracev (3+x,16+y,13+y); call tracev (3+x,33+y,32+y); call tracev (4+x,18+y,8+y); call tracev (4+x,34+y,32+y); call tracev (5+x,20+y,7+y); call tracev (5+x,35+y,32+y); call tracev (6+x,21+y,6+y); call tracev (6+x,36+y,33+y); call tracev (7+x,22+y,5+y); call tracev (7+x,36+y,34+y); call tracev (8+x,23+y,4+y); call tracev (8+x,37+y,34+y); call tracev (9+x,24+y,3+y); call tracev (9+x,37+y,35+y); call tracev (10+x,24+y,3+y); call tracev (10+x,38+y,35+y); call tracev (11+x,25+y,2+y); call tracev (11+x,38+y,36+y); call tracev (12+x,26+y,2+y); call tracev (12+x,38+y,36+y); call tracev (13+x,26+y,2+y); call tracev (13+x,38+y,36+y); call tracev (14+x,27+y,2+y); call tracev (14+x,39+y,36+y); call tracev (15+x,28+y,2+y); call tracev (15+x,39+y,36+y); call tracev (16+x,29+y,2+y); call tracev (16+x,39+y,35+y); call tracev (17+x,29+y,2+y); call tracev (17+x,39+y,35+y); call tracev (18+x,39+y,2+y); call tracev (19+x,8+y,2+y); call tracev (19+x,39+y,10+y); call tracev (20+x,6+y,2+y); call tracev (20+x,38+y,11+y); call tracev (21+x,5+y,2+y); call tracev (21+x,38+y,12+y); call tracev (22+x,4+y,2+y); call tracev (22+x,38+y,13+y); call tracev (23+x,4+y,2+y); call tracev (23+x,38+y,14+y); call tracev (24+x,4+y,2+y); call tracev (24+x,38+y,14+y); call tracev (25+x,4+y,2+y); call tracev (25+x,38+y,15+y); call tracev (26+x,4+y,2+y); call tracev (26+x,37+y,15+y); call tracev (27+x,5+y,2+y); call tracev (27+x,37+y,16+y); call tracev (28+x,5+y,3+y); call tracev (28+x,36+y,17+y); call tracev (29+x,6+y,3+y); call tracev (29+x,36+y,18+y); call tracev (30+x,8+y,4+y); call tracev (30+x,35+y,19+y); call tracev (31+x,4+y,2+y); call tracev (31+x,9+y,5+y); call tracev (31+x,34+y,20+y); call tracev (32+x,4+y,2+y); call tracev (32+x,9+y,6+y); call tracev (32+x,33+y,22+y); call tracev (33+x,4+y,2+y); call tracev (33+x,9+y,8+y); call tracev (33+x,30+y,25+y); call tracev (34+x,4+y,2+y); call tracev (35+x,4+y,2+y); call tracev (36+x,4+y,2+y); call tracev (37+x,4+y,2+y); call tracev (38+x,4+y,2+y); call tracev (39+x,4+y,2+y); call tracev (40+x,4+y,2+y); call tracev (41+x,4+y,2+y); call tracev (42+x,38+y,2+y); call tracev (43+x,38+y,2+y); call tracev (44+x,38+y,2+y); call tracev (45+x,38+y,2+y); call tracev (46+x,38+y,2+y); call tracev (47+x,38+y,2+y); call tracev (48+x,38+y,2+y); call tracev (49+x,38+y,2+y); call tracev (50+x,38+y,2+y); call tracev (51+x,38+y,2+y); call tracev (52+x,38+y,2+y); call tracev (53+x,38+y,2+y); call tracev (54+x,38+y,2+y); call tracev (55+x,38+y,2+y); call tracev (56+x,38+y,2+y); call tracev (57+x,38+y,2+y); call tracev (58+x,38+y,2+y); call tracev (59+x,38+y,2+y); call tracev (60+x,38+y,2+y); call tracev (61+x,4+y,2+y); call tracev (61+x,38+y,37+y); call tracev (62+x,4+y,2+y); call tracev (62+x,38+y,35+y); call tracev (63+x,4+y,2+y); call tracev (63+x,38+y,33+y); call tracev (64+x,4+y,2+y); call tracev (64+x,37+y,31+y); call tracev (65+x,4+y,2+y); call tracev (65+x,35+y,29+y); call tracev (66+x,4+y,2+y); call tracev (66+x,34+y,27+y); call tracev (67+x,4+y,2+y); call tracev (67+x,34+y,25+y); call tracev (68+x,4+y,2+y); call tracev (68+x,29+y,23+y); call tracev (68+x,34+y,31+y); call tracev (69+x,4+y,2+y); call tracev (69+x,27+y,21+y); call tracev (69+x,34+y,31+y); call tracev (70+x,4+y,2+y); call tracev (70+x,25+y,19+y); call tracev (70+x,34+y,31+y); call tracev (71+x,23+y,17+y); call tracev (71+x,34+y,31+y); call tracev (72+x,25+y,15+y); call tracev (72+x,34+y,31+y); call tracev (73+x,27+y,13+y); call tracev (73+x,34+y,31+y); call tracev (74+x,29+y,11+y); call tracev (74+x,34+y,31+y); call tracev (75+x,34+y,9+y); call tracev (76+x,34+y,7+y); call tracev (77+x,35+y,5+y); call tracev (78+x,37+y,3+y); call tracev (79+x,38+y,2+y); call tracev (80+x,38+y,3+y); call tracev (81+x,38+y,5+y); call tracev (82+x,38+y,7+y); call tracev (83+x,38+y,9+y); call tracev (84+x,38+y,11+y); call tracev (85+x,38+y,13+y); call tracev (86+x,38+y,15+y); call tracev (87+x,38+y,17+y); call tracev (88+x,38+y,19+y); call tracev (89+x,4+y,2+y); call tracev (89+x,38+y,21+y); call tracev (90+x,4+y,2+y); call tracev (90+x,38+y,23+y); call tracev (91+x,4+y,2+y); call tracev (91+x,38+y,25+y); call tracev (92+x,4+y,2+y); call tracev (92+x,38+y,27+y); call tracev (93+x,4+y,2+y); call tracev (93+x,38+y,29+y); call tracev (94+x,4+y,2+y); call tracev (94+x,38+y,31+y); call tracev (95+x,4+y,2+y); call tracev (95+x,38+y,33+y); call tracev (96+x,4+y,2+y); call tracev (96+x,38+y,35+y); call tracev (97+x,4+y,2+y); call tracev (97+x,38+y,37+y); call tracev (98+x,4+y,2+y); call tracev (99+x,38+y,2+y); call tracev (100+x,38+y,2+y); call tracev (101+x,38+y,2+y); call tracev (102+x,38+y,2+y); call tracev (103+x,38+y,2+y); call tracev (104+x,38+y,2+y); call tracev (105+x,38+y,2+y); call tracev (106+x,38+y,2+y); call tracev (107+x,38+y,2+y); call tracev (108+x,38+y,2+y); call tracev (109+x,38+y,2+y); call tracev (110+x,38+y,2+y); call tracev (111+x,38+y,2+y); call tracev (112+x,38+y,2+y); call tracev (113+x,38+y,2+y); call tracev (114+x,38+y,2+y); call tracev (115+x,38+y,2+y); call tracev (116+x,38+y,2+y); call tracev (117+x,38+y,2+y); call tracev (118+x,4+y,2+y); call tracev (119+x,4+y,2+y); call tracev (120+x,4+y,2+y); call tracev (121+x,4+y,2+y); call tracev (122+x,4+y,2+y); call tracev (123+x,4+y,2+y); call tracev (124+x,4+y,2+y); call tracev (124+x,16+y,10+y); call tracev (124+x,34+y,32+y); call tracev (125+x,4+y,2+y); call tracev (125+x,19+y,8+y); call tracev (125+x,35+y,32+y); call tracev (126+x,4+y,2+y); call tracev (126+x,21+y,6+y); call tracev (126+x,35+y,32+y); call tracev (127+x,4+y,2+y); call tracev (127+x,22+y,5+y); call tracev (127+x,36+y,33+y); call tracev (128+x,22+y,5+y); call tracev (128+x,36+y,34+y); call tracev (129+x,23+y,4+y); call tracev (129+x,37+y,34+y); call tracev (130+x,24+y,3+y); call tracev (130+x,38+y,35+y); call tracev (131+x,25+y,2+y); call tracev (131+x,38+y,36+y); call tracev (132+x,26+y,2+y); call tracev (132+x,38+y,36+y); call tracev (133+x,26+y,2+y); call tracev (133+x,38+y,36+y); call tracev (134+x,27+y,2+y); call tracev (134+x,39+y,36+y); call tracev (135+x,28+y,2+y); call tracev (135+x,39+y,36+y); call tracev (136+x,29+y,2+y); call tracev (136+x,39+y,36+y); call tracev (137+x,29+y,2+y); call tracev (137+x,39+y,35+y); call tracev (138+x,31+y,2+y); call tracev (138+x,39+y,33+y); call tracev (139+x,39+y,2+y); call tracev (140+x,6+y,2+y); call tracev (140+x,39+y,11+y); call tracev (141+x,5+y,2+y); call tracev (141+x,38+y,12+y); call tracev (142+x,5+y,2+y); call tracev (142+x,38+y,13+y); call tracev (143+x,4+y,2+y); call tracev (143+x,38+y,14+y); call tracev (144+x,4+y,2+y); call tracev (144+x,38+y,14+y); call tracev (145+x,4+y,2+y); call tracev (145+x,38+y,15+y); call tracev (146+x,4+y,2+y); call tracev (146+x,38+y,15+y); call tracev (147+x,4+y,2+y); call tracev (147+x,37+y,16+y); call tracev (148+x,5+y,2+y); call tracev (148+x,37+y,16+y); call tracev (149+x,5+y,3+y); call tracev (149+x,36+y,17+y); call tracev (150+x,6+y,3+y); call tracev (150+x,36+y,18+y); call tracev (151+x,8+y,4+y); call tracev (151+x,35+y,20+y); call tracev (152+x,9+y,6+y); call tracev (152+x,33+y,21+y); call tracev (153+x,9+y,7+y); call tracev (153+x,32+y,22+y); call tracev (154+x,9+y,8+y); call tracev (154+x,28+y,25+y); end dessinstat; unit dessinmenu : procedure (x,y,c : integer); begin call color (c); call tracev (8+x,47+y,45+y); call tracev (9+x,47+y,43+y); call tracev (10+x,45+y,40+y); call tracev (11+x,43+y,38+y); call tracev (12+x,41+y,35+y); call tracev (13+x,38+y,32+y); call tracev (14+x,36+y,30+y); call tracev (15+x,37+y,27+y); call tracev (16+x,38+y,25+y); call tracev (17+x,40+y,22+y); call tracev (18+x,41+y,20+y); call tracev (19+x,43+y,17+y); call tracev (20+x,44+y,14+y); call tracev (21+x,46+y,12+y); call tracev (22+x,47+y,10+y); call tracev (23+x,46+y,11+y); call tracev (24+x,44+y,13+y); call tracev (25+x,43+y,14+y); call tracev (26+x,41+y,16+y); call tracev (27+x,40+y,17+y); call tracev (28+x,38+y,19+y); call tracev (29+x,37+y,20+y); call tracev (30+x,36+y,22+y); call tracev (31+x,38+y,20+y); call tracev (32+x,41+y,19+y); call tracev (33+x,43+y,17+y); call tracev (34+x,45+y,16+y); call tracev (35+x,47+y,14+y); call tracev (36+x,47+y,13+y); call tracev (37+x,47+y,11+y); call tracev (38+x,47+y,10+y); call tracev (39+x,47+y,12+y); call tracev (40+x,47+y,14+y); call tracev (41+x,47+y,17+y); call tracev (42+x,47+y,19+y); call tracev (43+x,47+y,21+y); call tracev (44+x,47+y,24+y); call tracev (45+x,47+y,26+y); call tracev (46+x,47+y,29+y); call tracev (47+x,47+y,31+y); call tracev (48+x,47+y,33+y); call tracev (49+x,47+y,36+y); call tracev (50+x,47+y,38+y); call tracev (51+x,47+y,41+y); call tracev (52+x,47+y,43+y); call tracev (53+x,47+y,45+y); call tracev (55+x,47+y,10+y); call tracev (56+x,47+y,10+y); call tracev (57+x,47+y,10+y); call tracev (58+x,47+y,10+y); call tracev (59+x,47+y,10+y); call tracev (60+x,47+y,10+y); call tracev (61+x,47+y,10+y); call tracev (62+x,47+y,10+y); call tracev (63+x,47+y,10+y); call tracev (64+x,47+y,10+y); call tracev (65+x,47+y,10+y); call tracev (66+x,47+y,10+y); call tracev (67+x,47+y,10+y); call tracev (68+x,47+y,10+y); call tracev (69+x,47+y,10+y); call tracev (70+x,47+y,10+y); call tracev (71+x,47+y,10+y); call tracev (72+x,47+y,10+y); call tracev (73+x,13+y,10+y); call tracev (73+x,23+y,21+y); call tracev (73+x,47+y,44+y); call tracev (74+x,13+y,10+y); call tracev (74+x,23+y,21+y); call tracev (74+x,47+y,44+y); call tracev (75+x,13+y,10+y); call tracev (75+x,23+y,21+y); call tracev (75+x,47+y,44+y); call tracev (76+x,13+y,10+y); call tracev (76+x,23+y,21+y); call tracev (76+x,47+y,44+y); call tracev (77+x,13+y,10+y); call tracev (77+x,23+y,21+y); call tracev (77+x,47+y,44+y); call tracev (78+x,13+y,10+y); call tracev (78+x,23+y,21+y); call tracev (78+x,47+y,44+y); call tracev (79+x,13+y,10+y); call tracev (79+x,23+y,21+y); call tracev (79+x,47+y,44+y); call tracev (80+x,13+y,10+y); call tracev (80+x,23+y,21+y); call tracev (80+x,47+y,44+y); call tracev (81+x,13+y,10+y); call tracev (81+x,23+y,21+y); call tracev (81+x,47+y,44+y); call tracev (82+x,13+y,10+y); call tracev (82+x,23+y,21+y); call tracev (82+x,47+y,44+y); call tracev (83+x,13+y,10+y); call tracev (83+x,23+y,21+y); call tracev (83+x,47+y,44+y); call tracev (84+x,13+y,10+y); call tracev (84+x,23+y,21+y); call tracev (84+x,47+y,44+y); call tracev (85+x,13+y,10+y); call tracev (85+x,23+y,21+y); call tracev (85+x,47+y,44+y); call tracev (86+x,13+y,10+y); call tracev (86+x,23+y,21+y); call tracev (86+x,47+y,44+y); call tracev (87+x,13+y,10+y); call tracev (87+x,23+y,21+y); call tracev (87+x,47+y,44+y); call tracev (88+x,23+y,21+y); call tracev (88+x,47+y,44+y); call tracev (89+x,23+y,21+y); call tracev (89+x,47+y,44+y); call tracev (90+x,47+y,44+y); call tracev (92+x,47+y,10+y); call tracev (93+x,47+y,11+y); call tracev (94+x,30+y,11+y); call tracev (95+x,30+y,12+y); call tracev (96+x,31+y,12+y); call tracev (97+x,31+y,13+y); call tracev (98+x,32+y,14+y); call tracev (99+x,32+y,14+y); call tracev (100+x,33+y,15+y); call tracev (101+x,33+y,16+y); call tracev (102+x,34+y,16+y); call tracev (103+x,35+y,17+y); call tracev (104+x,35+y,17+y); call tracev (105+x,36+y,18+y); call tracev (106+x,36+y,19+y); call tracev (107+x,37+y,19+y); call tracev (108+x,37+y,20+y); call tracev (109+x,38+y,20+y); call tracev (110+x,39+y,21+y); call tracev (111+x,39+y,22+y); call tracev (112+x,40+y,22+y); call tracev (113+x,40+y,23+y); call tracev (114+x,41+y,23+y); call tracev (115+x,41+y,24+y); call tracev (116+x,42+y,25+y); call tracev (117+x,42+y,25+y); call tracev (118+x,43+y,26+y); call tracev (119+x,44+y,27+y); call tracev (120+x,44+y,27+y); call tracev (121+x,45+y,28+y); call tracev (122+x,45+y,28+y); call tracev (123+x,46+y,10+y); call tracev (124+x,46+y,10+y); call tracev (125+x,47+y,10+y); call tracev (127+x,37+y,10+y); call tracev (128+x,39+y,10+y); call tracev (129+x,41+y,10+y); call tracev (130+x,42+y,10+y); call tracev (131+x,43+y,10+y); call tracev (132+x,44+y,10+y); call tracev (133+x,45+y,10+y); call tracev (134+x,46+y,10+y); call tracev (135+x,46+y,10+y); call tracev (136+x,47+y,10+y); call tracev (137+x,47+y,10+y); call tracev (138+x,47+y,10+y); call tracev (139+x,47+y,10+y); call tracev (140+x,48+y,10+y); call tracev (141+x,48+y,10+y); call tracev (142+x,48+y,10+y); call tracev (143+x,48+y,10+y); call tracev (144+x,48+y,10+y); call tracev (145+x,48+y,45+y); call tracev (146+x,48+y,45+y); call tracev (147+x,48+y,45+y); call tracev (148+x,47+y,45+y); call tracev (149+x,47+y,45+y); call tracev (150+x,47+y,45+y); call tracev (151+x,47+y,44+y); call tracev (152+x,47+y,44+y); call tracev (153+x,47+y,43+y); call tracev (154+x,46+y,43+y); call tracev (155+x,46+y,42+y); call tracev (156+x,45+y,42+y); call tracev (157+x,44+y,41+y); call tracev (158+x,43+y,41+y); call tracev (159+x,43+y,39+y); call tracev (160+x,42+y,37+y); call tracev (161+x,41+y,10+y); call tracev (162+x,39+y,10+y); end dessinmenu; unit dessinelem : procedure (x,y,c : integer); begin call color (c); call tracev (41+x,3+y,1+y); call tracev (42+x,3+y,1+y); call tracev (43+x,3+y,1+y); call tracev (44+x,3+y,1+y); call tracev (45+x,3+y,1+y); call tracev (46+x,3+y,1+y); call tracev (47+x,3+y,1+y); call tracev (48+x,3+y,1+y); call tracev (49+x,3+y,1+y); call tracev (50+x,3+y,1+y); call tracev (51+x,3+y,1+y); call tracev (52+x,37+y,1+y); call tracev (53+x,37+y,1+y); call tracev (54+x,37+y,1+y); call tracev (55+x,37+y,1+y); call tracev (56+x,37+y,1+y); call tracev (57+x,37+y,1+y); call tracev (58+x,37+y,1+y); call tracev (59+x,37+y,1+y); call tracev (60+x,37+y,1+y); call tracev (61+x,37+y,1+y); call tracev (62+x,37+y,1+y); call tracev (63+x,37+y,1+y); call tracev (64+x,37+y,1+y); call tracev (65+x,37+y,1+y); call tracev (66+x,37+y,1+y); call tracev (67+x,37+y,1+y); call tracev (68+x,37+y,1+y); call tracev (69+x,37+y,1+y); call tracev (70+x,37+y,1+y); call tracev (71+x,3+y,1+y); call tracev (72+x,3+y,1+y); call tracev (73+x,3+y,1+y); call tracev (74+x,3+y,1+y); call tracev (75+x,3+y,1+y); call tracev (76+x,3+y,1+y); call tracev (77+x,3+y,1+y); call tracev (78+x,3+y,1+y); call tracev (79+x,3+y,1+y); call tracev (80+x,3+y,1+y); call tracev (82+x,2+y,1+y); call tracev (83+x,4+y,1+y); call tracev (84+x,6+y,1+y); call tracev (85+x,8+y,1+y); call tracev (86+x,10+y,1+y); call tracev (87+x,12+y,1+y); call tracev (88+x,14+y,1+y); call tracev (89+x,16+y,1+y); call tracev (90+x,18+y,1+y); call tracev (91+x,20+y,1+y); call tracev (92+x,22+y,1+y); call tracev (93+x,24+y,1+y); call tracev (94+x,26+y,1+y); call tracev (94+x,37+y,36+y); call tracev (95+x,28+y,1+y); call tracev (95+x,37+y,34+y); call tracev (96+x,30+y,1+y); call tracev (96+x,36+y,32+y); call tracev (97+x,34+y,1+y); call tracev (98+x,32+y,1+y); call tracev (99+x,30+y,1+y); call tracev (100+x,28+y,2+y); call tracev (101+x,26+y,4+y); call tracev (102+x,24+y,6+y); call tracev (103+x,22+y,8+y); call tracev (104+x,20+y,10+y); call tracev (105+x,18+y,12+y); call tracev (106+x,16+y,10+y); call tracev (107+x,14+y,8+y); call tracev (108+x,12+y,6+y); call tracev (109+x,10+y,4+y); call tracev (110+x,8+y,2+y); call tracev (111+x,6+y,1+y); call tracev (112+x,4+y,1+y); call tracev (113+x,2+y,1+y); call tracev (115+x,37+y,1+y); call tracev (116+x,37+y,1+y); call tracev (117+x,37+y,1+y); call tracev (118+x,37+y,1+y); call tracev (119+x,37+y,1+y); call tracev (120+x,37+y,1+y); call tracev (121+x,37+y,1+y); call tracev (122+x,37+y,1+y); call tracev (123+x,37+y,1+y); call tracev (124+x,37+y,1+y); call tracev (125+x,37+y,1+y); call tracev (126+x,37+y,1+y); call tracev (127+x,37+y,1+y); call tracev (128+x,37+y,1+y); call tracev (129+x,37+y,1+y); call tracev (130+x,37+y,1+y); call tracev (131+x,37+y,1+y); call tracev (132+x,37+y,1+y); call tracev (133+x,3+y,1+y); call tracev (133+x,27+y,25+y); call tracev (134+x,3+y,1+y); call tracev (134+x,27+y,25+y); call tracev (135+x,3+y,1+y); call tracev (135+x,28+y,26+y); call tracev (136+x,3+y,1+y); call tracev (136+x,28+y,26+y); call tracev (137+x,3+y,1+y); call tracev (137+x,28+y,26+y); call tracev (138+x,4+y,1+y); call tracev (138+x,28+y,25+y); call tracev (139+x,4+y,1+y); call tracev (139+x,28+y,25+y); call tracev (140+x,4+y,1+y); call tracev (140+x,28+y,25+y); call tracev (141+x,4+y,1+y); call tracev (141+x,28+y,25+y); call tracev (142+x,4+y,2+y); call tracev (142+x,27+y,25+y); call tracev (143+x,5+y,2+y); call tracev (143+x,27+y,24+y); call tracev (144+x,6+y,3+y); call tracev (144+x,26+y,23+y); call tracev (145+x,6+y,4+y); call tracev (145+x,25+y,22+y); call tracev (146+x,8+y,5+y); call tracev (146+x,24+y,22+y); call tracev (147+x,10+y,5+y); call tracev (147+x,23+y,19+y); call tracev (148+x,14+y,6+y); call tracev (148+x,22+y,17+y); call tracev (149+x,21+y,8+y); call tracev (150+x,20+y,10+y); call tracev (152+x,37+y,1+y); call tracev (153+x,37+y,1+y); call tracev (154+x,37+y,1+y); call tracev (155+x,37+y,1+y); call tracev (156+x,37+y,1+y); call tracev (157+x,37+y,1+y); call tracev (158+x,37+y,1+y); call tracev (159+x,37+y,1+y); call tracev (160+x,37+y,1+y); call tracev (161+x,37+y,1+y); call tracev (162+x,37+y,1+y); call tracev (163+x,37+y,1+y); call tracev (164+x,37+y,1+y); call tracev (165+x,37+y,1+y); call tracev (166+x,37+y,1+y); call tracev (167+x,37+y,1+y); call tracev (168+x,37+y,1+y); call tracev (169+x,37+y,1+y); call tracev (170+x,37+y,1+y); call tracev (171+x,3+y,1+y); call tracev (171+x,13+y,11+y); call tracev (171+x,37+y,35+y); call tracev (172+x,3+y,1+y); call tracev (172+x,13+y,11+y); call tracev (172+x,37+y,35+y); call tracev (173+x,3+y,1+y); call tracev (173+x,13+y,11+y); call tracev (173+x,37+y,35+y); call tracev (174+x,3+y,1+y); call tracev (174+x,13+y,11+y); call tracev (174+x,37+y,35+y); call tracev (175+x,3+y,1+y); call tracev (175+x,13+y,11+y); call tracev (175+x,37+y,35+y); call tracev (176+x,3+y,1+y); call tracev (176+x,13+y,11+y); call tracev (176+x,37+y,35+y); call tracev (177+x,3+y,1+y); call tracev (177+x,13+y,11+y); call tracev (177+x,37+y,35+y); call tracev (178+x,3+y,1+y); call tracev (178+x,13+y,11+y); call tracev (178+x,37+y,35+y); call tracev (179+x,3+y,1+y); call tracev (179+x,13+y,11+y); call tracev (179+x,37+y,35+y); call tracev (180+x,3+y,1+y); call tracev (180+x,13+y,11+y); call tracev (180+x,37+y,35+y); call tracev (181+x,3+y,1+y); call tracev (181+x,13+y,11+y); call tracev (181+x,37+y,35+y); call tracev (182+x,3+y,1+y); call tracev (182+x,13+y,11+y); call tracev (182+x,37+y,35+y); call tracev (183+x,3+y,1+y); call tracev (183+x,13+y,11+y); call tracev (183+x,37+y,35+y); call tracev (184+x,3+y,1+y); call tracev (184+x,13+y,11+y); call tracev (184+x,37+y,35+y); call tracev (185+x,3+y,1+y); call tracev (185+x,13+y,11+y); call tracev (185+x,37+y,35+y); call tracev (186+x,13+y,11+y); call tracev (186+x,37+y,35+y); call tracev (187+x,37+y,35+y); call tracev (188+x,37+y,35+y); end dessinelem; unit dessinrand : procedure (x,y,c : integer); begin call color (c); call tracev (0+x,39+y,2+y); call tracev (1+x,39+y,2+y); call tracev (2+x,39+y,2+y); call tracev (3+x,39+y,2+y); call tracev (4+x,39+y,2+y); call tracev (5+x,39+y,2+y); call tracev (6+x,39+y,2+y); call tracev (7+x,39+y,2+y); call tracev (8+x,39+y,2+y); call tracev (9+x,39+y,2+y); call tracev (10+x,39+y,2+y); call tracev (11+x,39+y,2+y); call tracev (12+x,39+y,2+y); call tracev (13+x,39+y,2+y); call tracev (14+x,39+y,2+y); call tracev (15+x,39+y,2+y); call tracev (16+x,39+y,2+y); call tracev (17+x,39+y,2+y); call tracev (18+x,39+y,2+y); call tracev (19+x,5+y,2+y); call tracev (19+x,31+y,27+y); call tracev (20+x,5+y,2+y); call tracev (20+x,32+y,27+y); call tracev (21+x,5+y,2+y); call tracev (21+x,29+y,27+y); call tracev (21+x,33+y,30+y); call tracev (22+x,5+y,2+y); call tracev (22+x,29+y,27+y); call tracev (22+x,34+y,31+y); call tracev (23+x,5+y,2+y); call tracev (23+x,29+y,27+y); call tracev (23+x,34+y,32+y); call tracev (24+x,5+y,3+y); call tracev (24+x,29+y,27+y); call tracev (24+x,35+y,32+y); call tracev (25+x,5+y,3+y); call tracev (25+x,29+y,27+y); call tracev (25+x,35+y,33+y); call tracev (26+x,5+y,3+y); call tracev (26+x,29+y,27+y); call tracev (26+x,36+y,33+y); call tracev (27+x,6+y,3+y); call tracev (27+x,29+y,26+y); call tracev (27+x,36+y,34+y); call tracev (28+x,6+y,4+y); call tracev (28+x,28+y,26+y); call tracev (28+x,36+y,34+y); call tracev (29+x,7+y,4+y); call tracev (29+x,28+y,25+y); call tracev (29+x,37+y,35+y); call tracev (30+x,7+y,4+y); call tracev (30+x,27+y,25+y); call tracev (30+x,37+y,35+y); call tracev (31+x,8+y,5+y); call tracev (31+x,27+y,24+y); call tracev (31+x,38+y,36+y); call tracev (32+x,10+y,6+y); call tracev (32+x,26+y,23+y); call tracev (32+x,38+y,36+y); call tracev (33+x,12+y,7+y); call tracev (33+x,25+y,21+y); call tracev (33+x,39+y,36+y); call tracev (34+x,24+y,8+y); call tracev (34+x,39+y,36+y); call tracev (35+x,23+y,10+y); call tracev (35+x,39+y,36+y); call tracev (36+x,21+y,12+y); call tracev (36+x,39+y,36+y); call tracev (38+x,39+y,37+y); call tracev (39+x,39+y,35+y); call tracev (40+x,38+y,33+y); call tracev (41+x,36+y,31+y); call tracev (42+x,35+y,29+y); call tracev (43+x,35+y,27+y); call tracev (44+x,30+y,25+y); call tracev (44+x,35+y,32+y); call tracev (45+x,28+y,23+y); call tracev (45+x,35+y,32+y); call tracev (46+x,26+y,21+y); call tracev (46+x,35+y,32+y); call tracev (47+x,24+y,18+y); call tracev (47+x,35+y,32+y); call tracev (48+x,25+y,16+y); call tracev (48+x,35+y,32+y); call tracev (49+x,27+y,14+y); call tracev (49+x,35+y,32+y); call tracev (50+x,28+y,12+y); call tracev (50+x,35+y,32+y); call tracev (51+x,30+y,10+y); call tracev (51+x,35+y,32+y); call tracev (52+x,35+y,8+y); call tracev (53+x,36+y,6+y); call tracev (54+x,38+y,4+y); call tracev (55+x,39+y,2+y); call tracev (56+x,39+y,4+y); call tracev (57+x,39+y,6+y); call tracev (58+x,39+y,8+y); call tracev (59+x,39+y,10+y); call tracev (60+x,39+y,12+y); call tracev (61+x,39+y,14+y); call tracev (62+x,39+y,16+y); call tracev (63+x,39+y,18+y); call tracev (64+x,39+y,20+y); call tracev (65+x,39+y,22+y); call tracev (66+x,39+y,24+y); call tracev (67+x,39+y,26+y); call tracev (68+x,39+y,28+y); call tracev (69+x,39+y,30+y); call tracev (70+x,39+y,32+y); call tracev (71+x,39+y,34+y); call tracev (72+x,39+y,36+y); call tracev (73+x,39+y,38+y); call tracev (75+x,39+y,2+y); call tracev (76+x,39+y,3+y); call tracev (77+x,22+y,3+y); call tracev (78+x,22+y,4+y); call tracev (79+x,23+y,4+y); call tracev (80+x,23+y,5+y); call tracev (81+x,24+y,6+y); call tracev (82+x,24+y,6+y); call tracev (83+x,25+y,7+y); call tracev (84+x,25+y,8+y); call tracev (85+x,26+y,8+y); call tracev (86+x,27+y,9+y); call tracev (87+x,27+y,9+y); call tracev (88+x,28+y,10+y); call tracev (89+x,28+y,11+y); call tracev (90+x,29+y,11+y); call tracev (91+x,29+y,12+y); call tracev (92+x,30+y,12+y); call tracev (93+x,31+y,13+y); call tracev (94+x,31+y,14+y); call tracev (95+x,32+y,14+y); call tracev (96+x,32+y,15+y); call tracev (97+x,33+y,15+y); call tracev (98+x,33+y,16+y); call tracev (99+x,34+y,17+y); call tracev (100+x,34+y,17+y); call tracev (101+x,35+y,18+y); call tracev (102+x,36+y,19+y); call tracev (103+x,36+y,19+y); call tracev (104+x,37+y,20+y); call tracev (105+x,37+y,20+y); call tracev (106+x,38+y,2+y); call tracev (107+x,38+y,2+y); call tracev (108+x,39+y,2+y); call tracev (111+x,39+y,2+y); call tracev (112+x,39+y,2+y); call tracev (113+x,39+y,2+y); call tracev (114+x,39+y,2+y); call tracev (115+x,39+y,2+y); call tracev (116+x,39+y,2+y); call tracev (117+x,39+y,2+y); call tracev (118+x,39+y,2+y); call tracev (119+x,39+y,2+y); call tracev (120+x,39+y,2+y); call tracev (121+x,39+y,2+y); call tracev (122+x,39+y,2+y); call tracev (123+x,39+y,2+y); call tracev (124+x,39+y,2+y); call tracev (125+x,39+y,2+y); call tracev (126+x,39+y,2+y); call tracev (127+x,39+y,2+y); call tracev (128+x,39+y,2+y); call tracev (129+x,39+y,2+y); call tracev (130+x,5+y,2+y); call tracev (130+x,39+y,36+y); call tracev (131+x,5+y,2+y); call tracev (131+x,39+y,36+y); call tracev (132+x,5+y,2+y); call tracev (132+x,38+y,36+y); call tracev (133+x,5+y,2+y); call tracev (133+x,38+y,36+y); call tracev (134+x,5+y,2+y); call tracev (134+x,38+y,36+y); call tracev (135+x,5+y,2+y); call tracev (135+x,38+y,36+y); call tracev (136+x,6+y,2+y); call tracev (136+x,37+y,35+y); call tracev (137+x,6+y,3+y); call tracev (137+x,37+y,35+y); call tracev (138+x,6+y,3+y); call tracev (138+x,37+y,35+y); call tracev (139+x,7+y,4+y); call tracev (139+x,36+y,34+y); call tracev (140+x,7+y,4+y); call tracev (140+x,36+y,34+y); call tracev (141+x,8+y,5+y); call tracev (141+x,35+y,33+y); call tracev (142+x,9+y,6+y); call tracev (142+x,35+y,32+y); call tracev (143+x,11+y,7+y); call tracev (143+x,34+y,30+y); call tracev (144+x,13+y,8+y); call tracev (144+x,33+y,28+y); call tracev (145+x,16+y,10+y); call tracev (145+x,31+y,25+y); call tracev (146+x,19+y,11+y); call tracev (146+x,30+y,22+y); call tracev (147+x,28+y,13+y); call tracev (148+x,26+y,15+y); call tracev (150+x,27+y,15+y); call tracev (151+x,29+y,13+y); call tracev (152+x,31+y,11+y); call tracev (153+x,32+y,10+y); call tracev (154+x,34+y,8+y); call tracev (155+x,35+y,7+y); call tracev (156+x,36+y,6+y); call tracev (157+x,36+y,6+y); call tracev (158+x,37+y,5+y); call tracev (159+x,37+y,4+y); call tracev (160+x,38+y,4+y); call tracev (161+x,38+y,3+y); call tracev (162+x,38+y,3+y); call tracev (163+x,39+y,2+y); call tracev (164+x,39+y,2+y); call tracev (165+x,39+y,2+y); call tracev (166+x,39+y,2+y); call tracev (167+x,40+y,2+y); call tracev (168+x,40+y,2+y); call tracev (169+x,5+y,2+y); call tracev (169+x,40+y,37+y); call tracev (170+x,5+y,2+y); call tracev (170+x,40+y,37+y); call tracev (171+x,5+y,2+y); call tracev (171+x,39+y,37+y); call tracev (172+x,5+y,2+y); call tracev (172+x,39+y,37+y); call tracev (173+x,5+y,2+y); call tracev (173+x,39+y,37+y); call tracev (174+x,5+y,2+y); call tracev (174+x,39+y,37+y); call tracev (175+x,6+y,2+y); call tracev (175+x,38+y,36+y); call tracev (176+x,6+y,3+y); call tracev (176+x,38+y,36+y); call tracev (177+x,6+y,3+y); call tracev (177+x,38+y,35+y); call tracev (178+x,7+y,4+y); call tracev (178+x,37+y,35+y); call tracev (179+x,7+y,4+y); call tracev (179+x,37+y,34+y); call tracev (180+x,8+y,5+y); call tracev (180+x,36+y,33+y); call tracev (181+x,9+y,6+y); call tracev (181+x,36+y,32+y); call tracev (182+x,11+y,7+y); call tracev (182+x,35+y,31+y); call tracev (183+x,13+y,8+y); call tracev (183+x,34+y,29+y); call tracev (184+x,16+y,10+y); call tracev (184+x,32+y,26+y); call tracev (184+x,39+y,37+y); call tracev (185+x,19+y,11+y); call tracev (185+x,31+y,23+y); call tracev (185+x,39+y,35+y); call tracev (186+x,29+y,13+y); call tracev (186+x,37+y,32+y); call tracev (187+x,27+y,15+y); call tracev (187+x,35+y,30+y); call tracev (188+x,33+y,27+y); call tracev (189+x,30+y,24+y); call tracev (190+x,28+y,22+y); call tracev (191+x,29+y,19+y); call tracev (192+x,30+y,17+y); call tracev (193+x,32+y,14+y); call tracev (194+x,33+y,12+y); call tracev (195+x,35+y,9+y); call tracev (196+x,36+y,6+y); call tracev (197+x,38+y,4+y); call tracev (198+x,39+y,2+y); call tracev (199+x,38+y,3+y); call tracev (200+x,36+y,5+y); call tracev (201+x,35+y,6+y); call tracev (202+x,33+y,8+y); call tracev (203+x,32+y,9+y); call tracev (204+x,30+y,11+y); call tracev (205+x,29+y,12+y); call tracev (206+x,28+y,14+y); call tracev (207+x,30+y,12+y); call tracev (208+x,33+y,11+y); call tracev (209+x,35+y,9+y); call tracev (210+x,37+y,8+y); call tracev (211+x,39+y,6+y); call tracev (212+x,39+y,5+y); call tracev (213+x,39+y,3+y); call tracev (214+x,39+y,2+y); call tracev (215+x,39+y,4+y); call tracev (216+x,39+y,6+y); call tracev (217+x,39+y,9+y); call tracev (218+x,39+y,11+y); call tracev (219+x,39+y,13+y); call tracev (220+x,39+y,16+y); call tracev (221+x,39+y,18+y); call tracev (222+x,39+y,21+y); call tracev (223+x,39+y,23+y); call tracev (224+x,39+y,25+y); call tracev (225+x,39+y,28+y); call tracev (226+x,39+y,30+y); call tracev (227+x,39+y,33+y); call tracev (228+x,39+y,35+y); call tracev (229+x,39+y,37+y); end dessinrand; unit dessinquick : procedure (x,y,c : integer); begin call color (c); call tracev (30+x,26+y,14+y); call tracev (31+x,28+y,12+y); call tracev (32+x,30+y,10+y); call tracev (33+x,31+y,9+y); call tracev (34+x,33+y,7+y); call tracev (35+x,34+y,6+y); call tracev (36+x,35+y,5+y); call tracev (37+x,36+y,4+y); call tracev (38+x,36+y,3+y); call tracev (39+x,37+y,3+y); call tracev (40+x,37+y,2+y); call tracev (41+x,37+y,2+y); call tracev (42+x,37+y,1+y); call tracev (43+x,38+y,1+y); call tracev (44+x,38+y,1+y); call tracev (45+x,38+y,1+y); call tracev (46+x,39+y,1+y); call tracev (47+x,39+y,1+y); call tracev (48+x,4+y,1+y); call tracev (48+x,39+y,36+y); call tracev (49+x,4+y,1+y); call tracev (49+x,39+y,36+y); call tracev (50+x,4+y,1+y); call tracev (50+x,38+y,36+y); call tracev (51+x,4+y,1+y); call tracev (51+x,38+y,36+y); call tracev (52+x,4+y,1+y); call tracev (52+x,38+y,36+y); call tracev (53+x,4+y,1+y); call tracev (53+x,38+y,35+y); call tracev (54+x,4+y,1+y); call tracev (54+x,31+y,30+y); call tracev (54+x,38+y,35+y); call tracev (55+x,5+y,2+y); call tracev (55+x,31+y,28+y); call tracev (55+x,37+y,34+y); call tracev (56+x,5+y,2+y); call tracev (56+x,32+y,29+y); call tracev (56+x,37+y,34+y); call tracev (57+x,5+y,3+y); call tracev (57+x,36+y,30+y); call tracev (58+x,6+y,3+y); call tracev (58+x,36+y,31+y); call tracev (59+x,7+y,4+y); call tracev (59+x,36+y,32+y); call tracev (60+x,7+y,5+y); call tracev (60+x,36+y,33+y); call tracev (61+x,8+y,5+y); call tracev (61+x,36+y,31+y); call tracev (62+x,10+y,6+y); call tracev (62+x,33+y,29+y); call tracev (62+x,37+y,34+y); call tracev (63+x,12+y,7+y); call tracev (63+x,32+y,28+y); call tracev (63+x,38+y,35+y); call tracev (64+x,15+y,9+y); call tracev (64+x,31+y,27+y); call tracev (64+x,38+y,35+y); call tracev (65+x,29+y,11+y); call tracev (65+x,38+y,36+y); call tracev (66+x,27+y,14+y); call tracev (66+x,38+y,36+y); call tracev (67+x,21+y,18+y); call tracev (67+x,39+y,36+y); call tracev (69+x,28+y,1+y); call tracev (70+x,30+y,1+y); call tracev (71+x,32+y,1+y); call tracev (72+x,33+y,1+y); call tracev (73+x,34+y,1+y); call tracev (74+x,35+y,1+y); call tracev (75+x,36+y,1+y); call tracev (76+x,37+y,1+y); call tracev (77+x,37+y,1+y); call tracev (78+x,38+y,1+y); call tracev (79+x,38+y,1+y); call tracev (80+x,38+y,1+y); call tracev (81+x,38+y,1+y); call tracev (82+x,39+y,1+y); call tracev (83+x,39+y,1+y); call tracev (84+x,39+y,1+y); call tracev (85+x,39+y,1+y); call tracev (86+x,39+y,1+y); call tracev (87+x,39+y,36+y); call tracev (88+x,39+y,36+y); call tracev (89+x,39+y,36+y); call tracev (90+x,38+y,36+y); call tracev (91+x,38+y,36+y); call tracev (92+x,38+y,36+y); call tracev (93+x,38+y,35+y); call tracev (94+x,38+y,35+y); call tracev (95+x,38+y,34+y); call tracev (96+x,37+y,34+y); call tracev (97+x,37+y,33+y); call tracev (98+x,36+y,33+y); call tracev (99+x,35+y,32+y); call tracev (100+x,34+y,32+y); call tracev (101+x,34+y,30+y); call tracev (102+x,33+y,28+y); call tracev (103+x,32+y,1+y); call tracev (104+x,30+y,1+y); call tracev (107+x,38+y,1+y); call tracev (108+x,38+y,1+y); call tracev (109+x,38+y,1+y); call tracev (110+x,38+y,1+y); call tracev (111+x,38+y,1+y); call tracev (112+x,38+y,1+y); call tracev (113+x,38+y,1+y); call tracev (114+x,38+y,1+y); call tracev (115+x,38+y,1+y); call tracev (116+x,38+y,1+y); call tracev (117+x,38+y,1+y); call tracev (118+x,38+y,1+y); call tracev (119+x,38+y,1+y); call tracev (120+x,38+y,1+y); call tracev (121+x,38+y,1+y); call tracev (122+x,38+y,1+y); call tracev (123+x,38+y,1+y); call tracev (124+x,38+y,1+y); call tracev (126+x,22+y,18+y); call tracev (127+x,26+y,14+y); call tracev (128+x,29+y,11+y); call tracev (129+x,31+y,9+y); call tracev (130+x,33+y,7+y); call tracev (131+x,34+y,6+y); call tracev (132+x,35+y,5+y); call tracev (133+x,35+y,5+y); call tracev (134+x,36+y,4+y); call tracev (135+x,36+y,3+y); call tracev (136+x,37+y,3+y); call tracev (137+x,37+y,2+y); call tracev (138+x,37+y,2+y); call tracev (139+x,38+y,1+y); call tracev (140+x,38+y,1+y); call tracev (141+x,38+y,1+y); call tracev (142+x,38+y,1+y); call tracev (143+x,39+y,1+y); call tracev (144+x,39+y,1+y); call tracev (145+x,4+y,1+y); call tracev (145+x,39+y,36+y); call tracev (146+x,4+y,1+y); call tracev (146+x,39+y,36+y); call tracev (147+x,4+y,1+y); call tracev (147+x,39+y,36+y); call tracev (148+x,4+y,1+y); call tracev (148+x,38+y,36+y); call tracev (149+x,4+y,1+y); call tracev (149+x,38+y,36+y); call tracev (150+x,4+y,1+y); call tracev (150+x,38+y,36+y); call tracev (151+x,4+y,2+y); call tracev (151+x,38+y,36+y); call tracev (152+x,4+y,2+y); call tracev (152+x,38+y,35+y); call tracev (153+x,5+y,2+y); call tracev (153+x,37+y,35+y); call tracev (154+x,5+y,2+y); call tracev (154+x,37+y,34+y); call tracev (155+x,6+y,3+y); call tracev (155+x,36+y,34+y); call tracev (156+x,6+y,4+y); call tracev (156+x,36+y,33+y); call tracev (157+x,7+y,4+y); call tracev (157+x,35+y,33+y); call tracev (158+x,8+y,5+y); call tracev (158+x,35+y,32+y); call tracev (159+x,10+y,5+y); call tracev (159+x,34+y,30+y); call tracev (160+x,11+y,6+y); call tracev (160+x,33+y,29+y); call tracev (161+x,11+y,8+y); call tracev (161+x,32+y,29+y); call tracev (162+x,11+y,10+y); call tracev (162+x,31+y,29+y); call tracev (164+x,38+y,1+y); call tracev (165+x,38+y,1+y); call tracev (166+x,38+y,1+y); call tracev (167+x,38+y,1+y); call tracev (168+x,38+y,1+y); call tracev (169+x,38+y,1+y); call tracev (170+x,38+y,1+y); call tracev (171+x,38+y,1+y); call tracev (172+x,38+y,1+y); call tracev (173+x,38+y,1+y); call tracev (174+x,38+y,1+y); call tracev (175+x,38+y,1+y); call tracev (176+x,38+y,1+y); call tracev (177+x,38+y,1+y); call tracev (178+x,38+y,1+y); call tracev (179+x,38+y,1+y); call tracev (180+x,38+y,1+y); call tracev (181+x,38+y,1+y); call tracev (182+x,38+y,1+y); call tracev (183+x,13+y,11+y); call tracev (184+x,13+y,11+y); call tracev (185+x,13+y,10+y); call tracev (186+x,15+y,9+y); call tracev (187+x,11+y,9+y); call tracev (187+x,17+y,12+y); call tracev (188+x,11+y,8+y); call tracev (188+x,19+y,14+y); call tracev (189+x,10+y,7+y); call tracev (189+x,21+y,16+y); call tracev (190+x,9+y,6+y); call tracev (190+x,23+y,18+y); call tracev (191+x,9+y,6+y); call tracev (191+x,25+y,20+y); call tracev (192+x,8+y,5+y); call tracev (192+x,27+y,22+y); call tracev (193+x,7+y,4+y); call tracev (193+x,29+y,24+y); call tracev (194+x,7+y,4+y); call tracev (194+x,31+y,25+y); call tracev (195+x,6+y,3+y); call tracev (195+x,33+y,27+y); call tracev (196+x,5+y,2+y); call tracev (196+x,35+y,29+y); call tracev (197+x,5+y,2+y); call tracev (197+x,37+y,31+y); call tracev (198+x,4+y,1+y); call tracev (198+x,38+y,33+y); call tracev (199+x,38+y,35+y); call tracev (200+x,38+y,37+y); end dessinquick; unit dessinbubble : procedure (x,y,c : integer); begin call color (c); call tracev (4+x,39+y,3+y); call tracev (5+x,39+y,3+y); call tracev (6+x,39+y,3+y); call tracev (7+x,39+y,3+y); call tracev (8+x,39+y,3+y); call tracev (9+x,39+y,3+y); call tracev (10+x,39+y,3+y); call tracev (11+x,39+y,3+y); call tracev (12+x,39+y,3+y); call tracev (13+x,39+y,3+y); call tracev (14+x,39+y,3+y); call tracev (15+x,39+y,3+y); call tracev (16+x,39+y,3+y); call tracev (17+x,39+y,3+y); call tracev (18+x,39+y,3+y); call tracev (19+x,39+y,3+y); call tracev (20+x,39+y,3+y); call tracev (21+x,39+y,3+y); call tracev (22+x,5+y,3+y); call tracev (22+x,39+y,37+y); call tracev (23+x,5+y,3+y); call tracev (23+x,22+y,21+y); call tracev (23+x,39+y,37+y); call tracev (24+x,5+y,3+y); call tracev (24+x,23+y,19+y); call tracev (24+x,39+y,37+y); call tracev (25+x,5+y,3+y); call tracev (25+x,23+y,19+y); call tracev (25+x,39+y,37+y); call tracev (26+x,5+y,3+y); call tracev (26+x,23+y,19+y); call tracev (26+x,39+y,37+y); call tracev (27+x,6+y,3+y); call tracev (27+x,23+y,19+y); call tracev (27+x,39+y,37+y); call tracev (28+x,6+y,3+y); call tracev (28+x,23+y,20+y); call tracev (28+x,39+y,37+y); call tracev (29+x,6+y,3+y); call tracev (29+x,23+y,20+y); call tracev (29+x,39+y,37+y); call tracev (30+x,6+y,3+y); call tracev (30+x,23+y,20+y); call tracev (30+x,39+y,36+y); call tracev (31+x,6+y,4+y); call tracev (31+x,23+y,20+y); call tracev (31+x,39+y,36+y); call tracev (32+x,6+y,4+y); call tracev (32+x,23+y,20+y); call tracev (32+x,39+y,36+y); call tracev (33+x,7+y,4+y); call tracev (33+x,23+y,19+y); call tracev (33+x,38+y,36+y); call tracev (34+x,7+y,5+y); call tracev (34+x,24+y,19+y); call tracev (34+x,38+y,35+y); call tracev (35+x,8+y,5+y); call tracev (35+x,21+y,18+y); call tracev (35+x,26+y,22+y); call tracev (35+x,38+y,35+y); call tracev (36+x,10+y,6+y); call tracev (36+x,21+y,18+y); call tracev (36+x,28+y,23+y); call tracev (36+x,37+y,34+y); call tracev (37+x,12+y,6+y); call tracev (37+x,20+y,14+y); call tracev (37+x,30+y,24+y); call tracev (37+x,37+y,32+y); call tracev (38+x,20+y,7+y); call tracev (38+x,36+y,26+y); call tracev (39+x,19+y,9+y); call tracev (39+x,34+y,28+y); call tracev (42+x,29+y,3+y); call tracev (43+x,32+y,3+y); call tracev (44+x,34+y,3+y); call tracev (45+x,35+y,3+y); call tracev (46+x,36+y,3+y); call tracev (47+x,37+y,3+y); call tracev (48+x,38+y,3+y); call tracev (49+x,39+y,3+y); call tracev (50+x,39+y,3+y); call tracev (51+x,40+y,3+y); call tracev (52+x,40+y,3+y); call tracev (53+x,40+y,3+y); call tracev (54+x,40+y,3+y); call tracev (55+x,40+y,3+y); call tracev (56+x,40+y,3+y); call tracev (57+x,40+y,3+y); call tracev (58+x,40+y,3+y); call tracev (59+x,40+y,3+y); call tracev (60+x,40+y,38+y); call tracev (61+x,40+y,38+y); call tracev (62+x,40+y,38+y); call tracev (63+x,40+y,37+y); call tracev (64+x,40+y,37+y); call tracev (65+x,40+y,37+y); call tracev (66+x,39+y,37+y); call tracev (67+x,39+y,37+y); call tracev (68+x,39+y,36+y); call tracev (69+x,38+y,36+y); call tracev (70+x,38+y,35+y); call tracev (71+x,37+y,35+y); call tracev (72+x,37+y,34+y); call tracev (73+x,36+y,33+y); call tracev (74+x,35+y,32+y); call tracev (75+x,34+y,29+y); call tracev (76+x,33+y,3+y); call tracev (77+x,32+y,3+y); call tracev (79+x,39+y,3+y); call tracev (80+x,39+y,3+y); call tracev (81+x,39+y,3+y); call tracev (82+x,39+y,3+y); call tracev (83+x,39+y,3+y); call tracev (84+x,39+y,3+y); call tracev (85+x,39+y,3+y); call tracev (86+x,39+y,3+y); call tracev (87+x,39+y,3+y); call tracev (88+x,39+y,3+y); call tracev (89+x,39+y,3+y); call tracev (90+x,39+y,3+y); call tracev (91+x,39+y,3+y); call tracev (92+x,39+y,3+y); call tracev (93+x,39+y,3+y); call tracev (94+x,39+y,3+y); call tracev (95+x,39+y,3+y); call tracev (96+x,39+y,3+y); call tracev (97+x,39+y,3+y); call tracev (98+x,5+y,3+y); call tracev (98+x,39+y,37+y); call tracev (99+x,5+y,3+y); call tracev (99+x,22+y,20+y); call tracev (99+x,39+y,37+y); call tracev (100+x,5+y,3+y); call tracev (100+x,23+y,19+y); call tracev (100+x,39+y,37+y); call tracev (101+x,5+y,3+y); call tracev (101+x,23+y,19+y); call tracev (101+x,39+y,37+y); call tracev (102+x,5+y,3+y); call tracev (102+x,23+y,19+y); call tracev (102+x,39+y,37+y); call tracev (103+x,6+y,3+y); call tracev (103+x,23+y,19+y); call tracev (103+x,39+y,37+y); call tracev (104+x,6+y,3+y); call tracev (104+x,23+y,20+y); call tracev (104+x,39+y,37+y); call tracev (105+x,6+y,3+y); call tracev (105+x,23+y,20+y); call tracev (105+x,39+y,37+y); call tracev (106+x,6+y,4+y); call tracev (106+x,23+y,20+y); call tracev (106+x,39+y,36+y); call tracev (107+x,6+y,4+y); call tracev (107+x,23+y,20+y); call tracev (107+x,39+y,36+y); call tracev (108+x,7+y,4+y); call tracev (108+x,23+y,19+y); call tracev (108+x,39+y,36+y); call tracev (109+x,7+y,5+y); call tracev (109+x,24+y,19+y); call tracev (109+x,38+y,36+y); call tracev (110+x,7+y,5+y); call tracev (110+x,24+y,18+y); call tracev (110+x,38+y,35+y); call tracev (111+x,8+y,5+y); call tracev (111+x,21+y,18+y); call tracev (111+x,26+y,23+y); call tracev (111+x,37+y,35+y); call tracev (112+x,10+y,6+y); call tracev (112+x,21+y,17+y); call tracev (112+x,28+y,23+y); call tracev (112+x,37+y,33+y); call tracev (113+x,20+y,6+y); call tracev (113+x,36+y,24+y); call tracev (114+x,19+y,7+y); call tracev (114+x,35+y,26+y); call tracev (115+x,17+y,9+y); call tracev (115+x,34+y,28+y); call tracev (117+x,39+y,3+y); call tracev (118+x,39+y,3+y); call tracev (119+x,39+y,3+y); call tracev (120+x,39+y,3+y); call tracev (121+x,39+y,3+y); call tracev (122+x,39+y,3+y); call tracev (123+x,39+y,3+y); call tracev (124+x,39+y,3+y); call tracev (125+x,39+y,3+y); call tracev (126+x,39+y,3+y); call tracev (127+x,39+y,3+y); call tracev (128+x,39+y,3+y); call tracev (129+x,39+y,3+y); call tracev (130+x,39+y,3+y); call tracev (131+x,39+y,3+y); call tracev (132+x,39+y,3+y); call tracev (133+x,39+y,3+y); call tracev (134+x,39+y,3+y); call tracev (135+x,39+y,3+y); call tracev (136+x,5+y,3+y); call tracev (136+x,39+y,37+y); call tracev (137+x,5+y,3+y); call tracev (137+x,22+y,20+y); call tracev (137+x,39+y,37+y); call tracev (138+x,5+y,3+y); call tracev (138+x,23+y,19+y); call tracev (138+x,39+y,37+y); call tracev (139+x,5+y,3+y); call tracev (139+x,23+y,19+y); call tracev (139+x,39+y,37+y); call tracev (140+x,5+y,3+y); call tracev (140+x,23+y,19+y); call tracev (140+x,39+y,37+y); call tracev (141+x,6+y,3+y); call tracev (141+x,23+y,19+y); call tracev (141+x,39+y,37+y); call tracev (142+x,6+y,3+y); call tracev (142+x,23+y,20+y); call tracev (142+x,39+y,37+y); call tracev (143+x,6+y,3+y); call tracev (143+x,23+y,20+y); call tracev (143+x,39+y,37+y); call tracev (144+x,6+y,4+y); call tracev (144+x,23+y,20+y); call tracev (144+x,39+y,36+y); call tracev (145+x,6+y,4+y); call tracev (145+x,23+y,20+y); call tracev (145+x,39+y,36+y); call tracev (146+x,7+y,4+y); call tracev (146+x,23+y,19+y); call tracev (146+x,39+y,36+y); call tracev (147+x,7+y,5+y); call tracev (147+x,24+y,19+y); call tracev (147+x,38+y,36+y); call tracev (148+x,7+y,5+y); call tracev (148+x,24+y,18+y); call tracev (148+x,38+y,35+y); call tracev (149+x,8+y,5+y); call tracev (149+x,21+y,18+y); call tracev (149+x,26+y,23+y); call tracev (149+x,37+y,35+y); call tracev (150+x,10+y,6+y); call tracev (150+x,21+y,17+y); call tracev (150+x,28+y,23+y); call tracev (150+x,37+y,33+y); call tracev (151+x,20+y,6+y); call tracev (151+x,36+y,24+y); call tracev (152+x,19+y,7+y); call tracev (152+x,35+y,26+y); call tracev (153+x,17+y,9+y); call tracev (153+x,34+y,28+y); call tracev (155+x,39+y,3+y); call tracev (156+x,39+y,3+y); call tracev (157+x,39+y,3+y); call tracev (158+x,39+y,3+y); call tracev (159+x,39+y,3+y); call tracev (160+x,39+y,3+y); call tracev (161+x,39+y,3+y); call tracev (162+x,39+y,3+y); call tracev (163+x,39+y,3+y); call tracev (164+x,39+y,3+y); call tracev (165+x,39+y,3+y); call tracev (166+x,39+y,3+y); call tracev (167+x,39+y,3+y); call tracev (168+x,39+y,3+y); call tracev (169+x,39+y,3+y); call tracev (170+x,39+y,3+y); call tracev (171+x,39+y,3+y); call tracev (172+x,39+y,3+y); call tracev (173+x,39+y,3+y); call tracev (174+x,39+y,37+y); call tracev (175+x,39+y,37+y); call tracev (176+x,39+y,37+y); call tracev (177+x,39+y,37+y); call tracev (178+x,39+y,37+y); call tracev (179+x,39+y,37+y); call tracev (180+x,39+y,37+y); call tracev (181+x,39+y,37+y); call tracev (182+x,39+y,37+y); call tracev (183+x,39+y,37+y); call tracev (184+x,39+y,37+y); call tracev (185+x,39+y,37+y); call tracev (186+x,39+y,37+y); call tracev (187+x,39+y,37+y); call tracev (188+x,39+y,37+y); call tracev (190+x,39+y,3+y); call tracev (191+x,39+y,3+y); call tracev (192+x,39+y,3+y); call tracev (193+x,39+y,3+y); call tracev (194+x,39+y,3+y); call tracev (195+x,39+y,3+y); call tracev (196+x,39+y,3+y); call tracev (197+x,39+y,3+y); call tracev (198+x,39+y,3+y); call tracev (199+x,39+y,3+y); call tracev (200+x,39+y,3+y); call tracev (201+x,39+y,3+y); call tracev (202+x,39+y,3+y); call tracev (203+x,39+y,3+y); call tracev (204+x,39+y,3+y); call tracev (205+x,39+y,3+y); call tracev (206+x,39+y,3+y); call tracev (207+x,39+y,3+y); call tracev (208+x,39+y,3+y); call tracev (209+x,5+y,3+y); call tracev (209+x,16+y,13+y); call tracev (209+x,39+y,37+y); call tracev (210+x,5+y,3+y); call tracev (210+x,16+y,13+y); call tracev (210+x,39+y,37+y); call tracev (211+x,5+y,3+y); call tracev (211+x,16+y,13+y); call tracev (211+x,39+y,37+y); call tracev (212+x,5+y,3+y); call tracev (212+x,16+y,13+y); call tracev (212+x,39+y,37+y); call tracev (213+x,5+y,3+y); call tracev (213+x,16+y,13+y); call tracev (213+x,39+y,37+y); call tracev (214+x,5+y,3+y); call tracev (214+x,16+y,13+y); call tracev (214+x,39+y,37+y); call tracev (215+x,5+y,3+y); call tracev (215+x,16+y,13+y); call tracev (215+x,39+y,37+y); call tracev (216+x,5+y,3+y); call tracev (216+x,16+y,13+y); call tracev (216+x,39+y,37+y); call tracev (217+x,5+y,3+y); call tracev (217+x,16+y,13+y); call tracev (217+x,39+y,37+y); call tracev (218+x,5+y,3+y); call tracev (218+x,16+y,13+y); call tracev (218+x,39+y,37+y); call tracev (219+x,5+y,3+y); call tracev (219+x,16+y,13+y); call tracev (219+x,39+y,37+y); call tracev (220+x,5+y,3+y); call tracev (220+x,16+y,13+y); call tracev (220+x,39+y,37+y); call tracev (221+x,5+y,3+y); call tracev (221+x,16+y,13+y); call tracev (221+x,39+y,37+y); call tracev (222+x,5+y,3+y); call tracev (222+x,16+y,13+y); call tracev (222+x,39+y,37+y); call tracev (223+x,16+y,13+y); call tracev (223+x,39+y,37+y); call tracev (224+x,16+y,13+y); call tracev (224+x,39+y,37+y); call tracev (225+x,39+y,37+y); end dessinbubble; unit dessinsort : procedure (x,y,c : integer); begin call color (c); call tracev (45+x,19+y,11+y); call tracev (45+x,35+y,33+y); call tracev (46+x,21+y,9+y); call tracev (46+x,36+y,33+y); call tracev (47+x,22+y,7+y); call tracev (47+x,37+y,33+y); call tracev (48+x,23+y,6+y); call tracev (48+x,37+y,34+y); call tracev (49+x,24+y,6+y); call tracev (49+x,38+y,35+y); call tracev (50+x,25+y,5+y); call tracev (50+x,38+y,36+y); call tracev (51+x,25+y,4+y); call tracev (51+x,39+y,36+y); call tracev (52+x,26+y,3+y); call tracev (52+x,39+y,37+y); call tracev (53+x,27+y,3+y); call tracev (53+x,39+y,37+y); call tracev (54+x,27+y,3+y); call tracev (54+x,39+y,37+y); call tracev (55+x,28+y,3+y); call tracev (55+x,40+y,37+y); call tracev (56+x,29+y,3+y); call tracev (56+x,40+y,37+y); call tracev (57+x,30+y,3+y); call tracev (57+x,40+y,37+y); call tracev (58+x,30+y,2+y); call tracev (58+x,40+y,36+y); call tracev (59+x,32+y,2+y); call tracev (59+x,40+y,34+y); call tracev (60+x,40+y,2+y); call tracev (61+x,6+y,2+y); call tracev (61+x,40+y,12+y); call tracev (62+x,6+y,2+y); call tracev (62+x,39+y,13+y); call tracev (63+x,5+y,2+y); call tracev (63+x,39+y,13+y); call tracev (64+x,5+y,2+y); call tracev (64+x,39+y,14+y); call tracev (65+x,5+y,2+y); call tracev (65+x,39+y,15+y); call tracev (66+x,5+y,3+y); call tracev (66+x,39+y,15+y); call tracev (67+x,5+y,3+y); call tracev (67+x,38+y,16+y); call tracev (68+x,5+y,3+y); call tracev (68+x,38+y,17+y); call tracev (69+x,6+y,3+y); call tracev (69+x,38+y,17+y); call tracev (70+x,7+y,4+y); call tracev (70+x,37+y,18+y); call tracev (71+x,8+y,4+y); call tracev (71+x,37+y,19+y); call tracev (72+x,9+y,5+y); call tracev (72+x,36+y,21+y); call tracev (73+x,9+y,6+y); call tracev (73+x,34+y,22+y); call tracev (74+x,9+y,8+y); call tracev (74+x,31+y,23+y); call tracev (75+x,24+y,20+y); call tracev (76+x,27+y,16+y); call tracev (77+x,30+y,12+y); call tracev (78+x,32+y,10+y); call tracev (79+x,34+y,8+y); call tracev (80+x,35+y,7+y); call tracev (81+x,36+y,6+y); call tracev (82+x,36+y,6+y); call tracev (83+x,37+y,5+y); call tracev (84+x,37+y,5+y); call tracev (85+x,38+y,4+y); call tracev (86+x,38+y,4+y); call tracev (87+x,38+y,4+y); call tracev (88+x,39+y,3+y); call tracev (89+x,39+y,3+y); call tracev (90+x,39+y,3+y); call tracev (91+x,39+y,2+y); call tracev (92+x,40+y,2+y); call tracev (93+x,40+y,2+y); call tracev (94+x,5+y,2+y); call tracev (94+x,40+y,37+y); call tracev (95+x,5+y,2+y); call tracev (95+x,40+y,37+y); call tracev (96+x,5+y,2+y); call tracev (96+x,40+y,37+y); call tracev (97+x,5+y,3+y); call tracev (97+x,39+y,37+y); call tracev (98+x,5+y,3+y); call tracev (98+x,39+y,37+y); call tracev (99+x,5+y,3+y); call tracev (99+x,39+y,37+y); call tracev (100+x,6+y,3+y); call tracev (100+x,38+y,36+y); call tracev (101+x,6+y,4+y); call tracev (101+x,38+y,36+y); call tracev (102+x,7+y,4+y); call tracev (102+x,38+y,36+y); call tracev (103+x,7+y,4+y); call tracev (103+x,38+y,35+y); call tracev (104+x,8+y,5+y); call tracev (104+x,37+y,35+y); call tracev (105+x,9+y,5+y); call tracev (105+x,37+y,34+y); call tracev (106+x,10+y,6+y); call tracev (106+x,36+y,33+y); call tracev (107+x,11+y,6+y); call tracev (107+x,35+y,31+y); call tracev (108+x,12+y,7+y); call tracev (108+x,34+y,30+y); call tracev (109+x,14+y,8+y); call tracev (109+x,32+y,28+y); call tracev (110+x,16+y,10+y); call tracev (110+x,31+y,26+y); call tracev (111+x,29+y,12+y); call tracev (112+x,27+y,16+y); call tracev (114+x,39+y,2+y); call tracev (115+x,39+y,2+y); call tracev (116+x,39+y,2+y); call tracev (117+x,39+y,2+y); call tracev (118+x,39+y,2+y); call tracev (119+x,39+y,2+y); call tracev (120+x,39+y,2+y); call tracev (121+x,39+y,2+y); call tracev (122+x,39+y,2+y); call tracev (123+x,39+y,2+y); call tracev (124+x,39+y,2+y); call tracev (125+x,39+y,2+y); call tracev (126+x,39+y,2+y); call tracev (127+x,39+y,2+y); call tracev (128+x,39+y,2+y); call tracev (129+x,39+y,2+y); call tracev (130+x,39+y,2+y); call tracev (131+x,39+y,2+y); call tracev (132+x,39+y,2+y); call tracev (133+x,5+y,2+y); call tracev (133+x,31+y,27+y); call tracev (134+x,5+y,2+y); call tracev (134+x,32+y,27+y); call tracev (135+x,5+y,3+y); call tracev (135+x,29+y,27+y); call tracev (135+x,33+y,30+y); call tracev (136+x,5+y,3+y); call tracev (136+x,30+y,27+y); call tracev (136+x,34+y,31+y); call tracev (137+x,5+y,3+y); call tracev (137+x,30+y,27+y); call tracev (137+x,34+y,32+y); call tracev (138+x,6+y,3+y); call tracev (138+x,30+y,27+y); call tracev (138+x,35+y,32+y); call tracev (139+x,6+y,3+y); call tracev (139+x,29+y,27+y); call tracev (139+x,36+y,33+y); call tracev (140+x,6+y,3+y); call tracev (140+x,29+y,27+y); call tracev (140+x,36+y,34+y); call tracev (141+x,6+y,3+y); call tracev (141+x,29+y,27+y); call tracev (141+x,37+y,35+y); call tracev (142+x,6+y,4+y); call tracev (142+x,29+y,27+y); call tracev (142+x,37+y,35+y); call tracev (143+x,7+y,4+y); call tracev (143+x,29+y,26+y); call tracev (143+x,38+y,35+y); call tracev (144+x,7+y,4+y); call tracev (144+x,28+y,25+y); call tracev (144+x,38+y,35+y); call tracev (145+x,8+y,5+y); call tracev (145+x,27+y,24+y); call tracev (145+x,38+y,36+y); call tracev (146+x,5+y,2+y); call tracev (146+x,10+y,6+y); call tracev (146+x,26+y,24+y); call tracev (146+x,38+y,36+y); call tracev (147+x,5+y,2+y); call tracev (147+x,12+y,7+y); call tracev (147+x,25+y,21+y); call tracev (147+x,39+y,37+y); call tracev (148+x,5+y,2+y); call tracev (148+x,24+y,8+y); call tracev (148+x,39+y,37+y); call tracev (149+x,5+y,2+y); call tracev (149+x,23+y,10+y); call tracev (149+x,39+y,37+y); call tracev (150+x,5+y,2+y); call tracev (150+x,21+y,12+y); call tracev (150+x,39+y,37+y); call tracev (151+x,5+y,2+y); call tracev (152+x,5+y,2+y); call tracev (153+x,5+y,2+y); call tracev (154+x,5+y,2+y); call tracev (155+x,5+y,2+y); call tracev (156+x,39+y,2+y); call tracev (157+x,39+y,2+y); call tracev (158+x,39+y,2+y); call tracev (159+x,39+y,2+y); call tracev (160+x,39+y,2+y); call tracev (161+x,39+y,2+y); call tracev (162+x,39+y,2+y); call tracev (163+x,39+y,2+y); call tracev (164+x,39+y,2+y); call tracev (165+x,39+y,2+y); call tracev (166+x,39+y,2+y); call tracev (167+x,39+y,2+y); call tracev (168+x,39+y,2+y); call tracev (169+x,39+y,2+y); call tracev (170+x,39+y,2+y); call tracev (171+x,39+y,2+y); call tracev (172+x,39+y,2+y); call tracev (173+x,39+y,2+y); call tracev (174+x,39+y,2+y); call tracev (175+x,5+y,2+y); call tracev (176+x,5+y,2+y); call tracev (177+x,5+y,2+y); call tracev (178+x,5+y,2+y); call tracev (179+x,5+y,2+y); call tracev (180+x,5+y,2+y); call tracev (181+x,5+y,2+y); call tracev (182+x,5+y,2+y); call tracev (183+x,5+y,2+y); call tracev (184+x,5+y,2+y); end dessinsort; unit BOUTON : procedure(x,y,x2,y2,col_font,col1,col2:integer); var i : integer; begin call RECTANGLE_PLEIN (x+2,y+2,x2-2,y2-2,col_font,col_font); for i:= 0 to 2 do call color (col1); call move (x+i,y); call draw (x+i,y2-i); call move (x,y+i); call draw (x2-i,y+i); call color (col2); call move (x2,y2-i); call draw (x+i,y2-i); call move (x2-i,y2); call draw (x2-i,y+i); od; call color (7); call RECTANGLE (x-1,y-1,x2+1,y2+1); call color (7); call move (x2,y2); call draw (x2-2,y2-2); call color (col2); call move (x+3,y+3); call draw (x2-3,y+3); call move (x+3,y+3); call draw (x+3,y2-3); call color (col1); call move (x2-3,y2-3); call draw (x+4,y2-3); call move (x2-3,y2-3); call draw (x2-3,y+4); end BOUTON; UNIT RECTANGLE_PLEINV : procedure(x_h,y_h,x_b,y_b, coul,contour:integer); var i : integer ; BEGIN call color (coul); for i:= y_h to y_b do call move (x_h,i); call hfill (x_b); od; call color (contour); call move(x_h,y_h); call draw(x_b,y_h); call draw(x_b,y_b); call draw(x_h,y_b); call draw(x_h,y_h); END RECTANGLE_PLEINV; unit aff_nb : procedure (x,y,nb,dec,c : integer); var i,k : integer begin k := 1; call rectangle_plein (x-2,y-2,x+dec*8+9,y+8,0,15); call color (c); for i := 0 to dec do call move (x+(dec-i)*8,y); call hascii (48+ (nb div k) mod 10); k := k*10; od; end aff_nb; unit CHARGE_FOND : procedure; var i,j,n : integer, col : integer, c : char; begin call color (15); for i:=0 to 10 do call move (0,i*32); call hfill (639); od; for i:=0 to 15 do call move (i*40,0); call vfill (349); od; call color (8); for i:=0 to 10 do call move (0,i*32+29); call hfill (639); call move (0,i*32+30); call hfill (639); od; for i:=0 to 15 do call move (i*40+37,0); call vfill (349); call move (i*40+38,0); call vfill (349); od; call color (7); for i:=0 to 10 do call move (0,i*32+31); call hfill (639); od; for i:=0 to 15 do call move (i*40+39,0); call vfill (349); od; call color (15); for i:=0 to 10 do call move (0,i*32); call hfill (639); od; for i:=0 to 15 do call move (i*40,0); call vfill (349); od; call RECTANGLE_PLEIN (70,80,570,300,1,1); call RECTANGLE_PLEIN (105,301,581,309,8,8); call RECTANGLE_PLEIN (570,105,581,301,8,8); end CHARGE_FOND; unit AFF_OPTIONS : procedure; begin (* definition des boutons *) call BOUTON (150,100,190,125,7,15,8); call BOUTON (150,155,190,180,7,15,8); call BOUTON (150,210,190,235,7,15,8); call BOUTON (150,265,190,290,7,15,8); (* definition des barres de textes*) call RECTANGLE_PLEIN (230,100,500,125,7,15); call RECTANGLE_PLEIN (230,155,500,180,7,15); call RECTANGLE_PLEIN (230,210,500,235,7,15); call RECTANGLE_PLEIN (230,265,500,290,7,15); (* texte *) call pallet (7); call color (15); call move (249,110); call outstring ("CHOIX DES ELEMENTS A TRIER"); call move (249,165); call outstring ("GENERER DES NOUVELLES VALEURS"); call move (249,220); call outstring ("TRI DES ELEMENTS "); call move (249,275); call outstring ("QUITTER LE PROGRAMME"); call color (8); call move (251,111); call outstring ("CHOIX DES ELEMENTS A TRIER"); call move (251,166); call outstring ("GENERER DES NOUVELLES VALEURS"); call move (251,221); call outstring ("TRI DES ELEMENTS "); call move (251,276); call outstring ("QUITTER LE PROGRAMME"); end AFF_OPTIONS; unit DELAI : procedure ( n : integer); var i : integer; begin for i := 1 to n do od; end DELAI; unit CHOIX_UTIL : procedure ; begin pref STR_ELEMENTS block var x,y,p,choix_courant,nbelems : integer, gauche,droit,centre : boolean; BEGIN call dessinmenu (250,10,8); call dessinmenu (247,7,4); call AFF_OPTIONS; choix_courant := 1; nbelems := 100; do call showcursor; call setwindow (70,570,80,300); call getpress (0,x,y,p,gauche,droit,centre); if (gauche) then call hidecursor; if (x>150 and x<190) then if (y>100 and y<125) then call BOUTON (150,100,190,125,7,8,15); call DELAI (2000); call BOUTON (150,100,190,125,7,15,8); call CHOIX_ELEM(choix_courant,nbelems); call AFF_OPTIONS; call eff_titre; call dessinmenu (250,10,8); call dessinmenu (247,7,4); fi; if (y>155 and y<180) then call BOUTON (150,155,190,180,7,8,15); call DELAI (2000); call BOUTON (150,155,190,180,7,15,8); call CHOIX_NB_ELEM(nbelems,choix_courant); call AFF_OPTIONS; call eff_titre; call dessinmenu (250,10,8); call dessinmenu (247,7,4); fi; if (y>210 and y<235) then call BOUTON (150,210,190,235,7,8,15); call DELAI (2000); call BOUTON (150,210,190,235,7,15,8); call AFF_TRI(choix_courant,nbelems); call CHARGE_FOND; call AFF_OPTIONS; call eff_titre; call dessinmenu (250,10,8); call dessinmenu (247,7,4); fi; if (y>265 and y<290) then call BOUTON (150,265,190,290,7,8,15); call DELAI (2000); call BOUTON (150,265,190,290,7,15,8); exit ; fi; fi; fi; od; end; end CHOIX_UTIL; unit AFF_CONTOUR_CHOIX : procedure (choix_courant,coul : integer); begin call color (coul); case choix_courant when 1: call RECTANGLE (229,89,501,146); call RECTANGLE (228,88,502,147); call RECTANGLE (227,87,503,148); when 2: call RECTANGLE (229,159,501,216); call RECTANGLE (228,158,502,217); call RECTANGLE (227,157,503,218); when 3: call RECTANGLE (229,229,501,286); call RECTANGLE (228,228,502,287); call RECTANGLE (227,227,503,288); esac; end AFF_CONTOUR_CHOIX; unit GRAPH_ELEM : procedure ; begin (* histogrammes *) call BOUTON (150,105,190,130,7,15,8); call RECTANGLE_PLEIN (230,90,500,132,7,8); call RECTANGLE_PLEIN (250,100,270,130,4,4); call RECTANGLE_PLEIN (280,120,300,130,2,2); call RECTANGLE_PLEIN (310,110,330,130,13,13); call RECTANGLE_PLEIN (340,95,360,130,9,9); call RECTANGLE_PLEIN (370,105,390,130,1,1); call RECTANGLE_PLEIN (400,108,420,130,12,12); call RECTANGLE_PLEIN (430,115,450,130,10,10); call RECTANGLE_PLEIN (460,100,480,130,11,11); call RECTANGLE_PLEIN (230,132,500,145,7,8); call color (15); call move (270,136); call outstring ("H I S T O G R A M M E S"); call color (8); call move (271,137); call outstring ("H I S T O G R A M M E S"); (* polynomes *) call BOUTON (150,175,190,200,7,15,8); call RECTANGLE_PLEIN (230,160,500,202,7,8); call RECTANGLE_PLEIN (230,202,500,215,7,8); call color (1); call move (240,170); call outstring ("X^2+3"); call color (4); call move (270,185); call outstring ("-4X^5+5X^4-2X^3+6"); call color (2); call move (300,165); call outstring ("6X+5"); call color (11); call move (405,175); call outstring ("-X^2+2X-3"); call color (15); call move (295,206); call outstring ("P O L Y N O M E S"); call color (8); call move (296,207); call outstring ("P O L Y N O M E S"); (* rectangles *) call RECTANGLE_PLEIN (230,230,500,272,7,8); call BOUTON (150,245,190,270,7,15,8); call RECTANGLE_PLEIN (250,235,290,267,13,13); call RECTANGLE_PLEIN (300,255,330,270,12,12); call RECTANGLE_PLEIN (340,240,400,272,10,10); call RECTANGLE_PLEIN (410,232,430,265,9,9); call RECTANGLE_PLEIN (440,243,480,260,4,4); call RECTANGLE_PLEIN (230,272,500,285,7,8); call color (15); call move (305,276); call outstring ("S U R F A C E S"); call color (8); call move (306,277); call outstring ("S U R F A C E S"); end GRAPH_ELEM; unit CHOIX_ELEM : procedure(inout choix_courant,nbelems : integer); var x,y,p : integer, choix : char, gauche,droit,centre : boolean; begin call EFFACE (70,80,570,300,9,1,15); call eff_titre; call dessinelem (206,20,8); call dessinelem (203,17,4); call GRAPH_ELEM; call AFF_CONTOUR_CHOIX(choix_courant,15); call BOUTON (80,175,130,200,7,15,8); call move (92,185); call color (4); call outstring ("O K"); call showcursor; do call getpress (0,x,y,p,gauche,droit,centre); if (gauche) then call hidecursor; if ( x >150 and x <190 and y>105 and y<130) then call BOUTON (150,105,190,130,7,8,15); call DELAI (2000); call BOUTON (150,105,190,130,7,15,8); call AFF_CONTOUR_CHOIX(1,15); call AFF_CONTOUR_CHOIX(2,1); call AFF_CONTOUR_CHOIX(3,1); choix_courant := 1; nbelems := 100; fi; if ( x >150 and x <190 and y>175 and y<200) then call BOUTON (150,175,190,200,7,8,15); call DELAI (2000); call BOUTON (150,175,190,200,7,15,8); call AFF_CONTOUR_CHOIX(2,15); call AFF_CONTOUR_CHOIX(1,1); call AFF_CONTOUR_CHOIX(3,1); choix_courant := 2; nbelems := 10; fi; if ( x >150 and x <190 and y>245 and y<270) then call BOUTON (150,245,190,270,7,8,15); call DELAI (2000); call BOUTON (150,245,190,270,7,15,8); call AFF_CONTOUR_CHOIX(1,1); call AFF_CONTOUR_CHOIX(2,1); call AFF_CONTOUR_CHOIX(3,15); choix_courant := 3; nbelems := 25; fi; if (x>80 and x<130 and y>130 and y<200) then call BOUTON (80,175,130,200,7,8,15); call move (92,185); call color (8); call outstring ("O K"); call DELAI (2000); call BOUTON (80,175,130,200,7,15,8); call EFFACE(70,80,570,300,9,1,15); exit; fi; call showcursor ; fi; od; end CHOIX_ELEM; unit AFF_C : procedure (coul,nb_bouton : integer); begin call color (coul); case nb_bouton when 1 : call RECTANGLE (199,159,241,186); call RECTANGLE (198,158,242,187); call RECTANGLE (197,157,243,188); when 2 : call RECTANGLE (299,159,341,186); call RECTANGLE (298,158,342,187); call RECTANGLE (297,157,343,188); when 3 : call RECTANGLE (399,159,441,186); call RECTANGLE (398,158,442,187); call RECTANGLE (397,157,443,188); esac; end AFF_C; unit GERE_CHOIX_NB : procedure (choix_courant :integer ;inout nbelems : integer); var x,y,p : integer, gauche,droit,centre : boolean; begin call showcursor; call setwindow (70,570,80,300); do call getpress (0,x,y,p,gauche,droit,centre); if (gauche) then call hidecursor; if ( x >200 and x <240 and y>200 and y<225) then call BOUTON (200,200,240,225,7,8,15); call DELAI (2000); call BOUTON (200,200,240,225,7,15,8); case choix_courant when 1 : nbelems := 30; when 2 : nbelems := 5; when 3 : nbelems := 15; esac; call AFF_C(15,1); call AFF_C(1,2); call AFF_C(1,3); fi; if ( x >300 and x <340 and y>200 and y<225) then call BOUTON (300,200,340,225,7,8,15); call DELAI (2000); call BOUTON (300,200,340,225,7,15,8); case choix_courant when 1 : nbelems := 100; when 2 : nbelems := 10; when 3 : nbelems := 25; esac; call AFF_C(1,1); call AFF_C(15,2); call AFF_C(1,3); fi; if ( x >400 and x <440 and y>200 and y<225) then call BOUTON (400,200,440,225,7,8,15); call DELAI (2000); call BOUTON (400,200,440,225,7,15,8); case choix_courant when 1 : nbelems := 150 ; when 2 : nbelems := 20; when 3 : nbelems := 50; esac; call AFF_C(1,1); call AFF_C(1,2); call AFF_C(15,3); fi; if ( x >265 and x <365 and y>250 and y<280) then call BOUTON (265,250,365,280,7,8,15); call DELAI (2000); call BOUTON (265,250,365,280,7,15,8); exit ; fi; call showcursor; call setwindow (70,570,80,300); fi; od; end GERE_CHOIX_NB; unit CHOIX_NB_ELEM : procedure (inout nbelems :integer; choix_courant : integer); var coul,nbbouton : integer, choix : char ; begin call EFFACE (70,80,570,300,9,1,15); call eff_titre; call dessinrand (206,20,8); call dessinrand (203,17,4); call RECTANGLE_PLEIN(150,100,490,150,7,15); call RECTANGLE_PLEIN (200,160,240,185,7,15); call BOUTON (200,200,240,225,7,15,8); call RECTANGLE_PLEIN (300,160,340,185,7,15); call BOUTON (300,200,340,225,7,15,8); call RECTANGLE_PLEIN (400,160,440,185,7,15); call BOUTON (400,200,440,225,7,15,8); call BOUTON (265,250,365,280,7,15,8); call color (4); case choix_courant when 1 : call move (250,120); call outstring ("H I S T O G R A M M E S"); call move (209,167); call outstring ("30"); call move (309,167); call outstring ("100"); call move (405,167); call outstring ("150"); when 2 : call move (250,120); call outstring (" P O L Y N O M E S"); call move (209,167); call outstring ("5"); call move (309,167); call outstring ("10"); call move (405,167); call outstring ("20"); when 3 : call move (255,120); call outstring ("S U R F A C E S"); call move (209,167); call outstring ("15"); call move (309,167); call outstring ("25"); call move (405,167); call outstring ("50"); esac; coul := 15; if (nbelems=30 or nbelems =5 or nbelems =15) then call AFF_C(15,1); else if (nbelems = 100 or nbelems = 10 or nbelems = 25) then call AFF_C(15,2); else call AFF_C(15,3); fi; fi; call GERE_CHOIX_NB (choix_courant,nbelems); call EFFACE (70,80,570,300,9,1,15); end CHOIX_NB_ELEM; unit AFF_RENS : procedure ; begin call color (15); call move (0,174); call draw (639,174); call move (0,110); call draw (639,110); call move (0,285); call draw (639,285); call move (0,284); call draw (639,284); call dessinquick (-23+3,123+3,8); call dessinsort (220+3,123+3,8); call dessinquick (-23,123,9); call dessinsort (220,123,9); call dessinbubble (0+3,300+3,8); call dessinsort (220+3,300+3,8); call dessinbubble (0,300,14); call dessinsort (220,300,14); call RECTANGLE_PLEIN (415,115,520,130,7,15); call RECTANGLE_PLEIN (415,135,520,150,7,15); call color (4); call move (420,120); call outstring ("PERMUTATIONS"); call move (420,140); call outstring ("COMPARAISONS"); call move (420,160); call color (4); call outstring ("en cours ..."); call RECTANGLE_PLEIN (415,290,520,305,7,15); call RECTANGLE_PLEIN (415,310,520,325,7,15); call color (4); call move (420,295); call outstring ("PERMUTATIONS"); call move (420,315); call outstring ("COMPARAISONS"); call move (420,335); call color (4); call outstring ("en attente "); end AFF_RENS; unit AFF_RENS_FIN : procedure; begin call RECTANGLE_PLEIN (415,155,520,170,7,7); call RECTANGLE_PLEIN (415,330,520,345,7,7); call color (4); call move (420,160); call outstring ("tri fini."); call move (420,335); call outstring ("en cours ..."); end AFF_RENS_FIN; unit AFF_RENS_FIN2 : procedure; begin call RECTANGLE_PLEIN (415,330,520,345,7,7); call color (4); call move (420,335); call outstring ("tri fini."); end AFF_RENS_FIN2; unit STATS: procedure(nb_iterationsq,nb_iterationsb,nbelems:integer); var trouve : boolean, chaine1,chaine2 : string, choix : char, i,x1,x2,x3,x4,itermax,ind_perfb, calcule_cmq,calcule_cmb,cout_maxb,cout_maxq, ind_perfq,marque : integer, sauve_valq,sauve_valb , pas_q,pas_b,facteur : real; begin trouve := true; call pallet(0); call RECTANGLE_PLEIN(0,0,639,349,0,15); call dessinstat(235+3,10+3,8); call dessinstat(235,10,9); call move (115,90); call color (8); call outstring ("INDICE DE RAPIDITE (calcul‚ sur la base des comparaisons)"); call move (114,89); call color (15); call outstring ("INDICE DE RAPIDITE (calcul‚ sur la base des comparaisons)"); call move (5,107); call color (9); call outstring ("QUICK SORT"); call move (5,157); call outstring ("BUBBLE SORT"); call RECTANGLE_PLEIN(99,100,551,130,8,15); call RECTANGLE_PLEIN(99,150,551,180,8,15); call aff_nb (570,115,nb_iterationsq,4,15); call aff_nb (570,165,nb_iterationsb,4,15); facteur := nb_iterationsq / 100; pas_q := facteur * 450 / nb_iterationsq ; pas_b := facteur * 450 / nb_iterationsb ; call color (4); if nb_iterationsq>nb_iterationsb then itermax := nb_iterationsq; else itermax := nb_iterationsb; fi; itermax := entier (itermax / facteur); for i := 0 to itermax do x1 := entier(i*pas_q); x2 := entier(i*pas_b); x3 := entier ((i+1)*pas_q); x4 := entier ((i+1)*pas_b); sauve_valq := 100 + x1 ; sauve_valb := 100 + x2 ; if (x3 <= 450) then call RECTANGLE_PLEIN(sauve_valq,101,100+x3,129,4,4); else if trouve then call color (15); trouve := false; call move (sauve_valb,140); call outstring ("³"); fi; fi; if (x4 <= 450) then call RECTANGLE_PLEIN(sauve_valb,151,100+x4,179,4,4); fi; od; cout_maxb := entier((nbelems*(nbelems-1)) / 2); cout_maxq := entier((((nbelems+1)*(nbelems+2)/2)-3)); ind_perfb := 100 - ((nb_iterationsb*100)/cout_maxb); ind_perfq := 100 -((nb_iterationsq*100)/cout_maxq); chaine1 := "QUICK SORT"; chaine2 := "BUBBLE SORT"; call move (180,190); call color (8); call outstring ("W I N N E R :"); call move (178,188); call color (14); call outstring ("W I N N E R :"); call color (9); if (nb_iterationsq < nb_iterationsb) then call move (290,190); call outstring(chaine1); else call move (290,190); call outstring (chaine2); fi; call RECTANGLE_PLEIN (20,210,620,330,0,15); call color (15); call move (20,250); call draw (620,250); call move (20,290); call draw (620,290); call move (140,210); call draw (140,330); call move (260,210); call draw (260,330); call move (380,210); call draw (380,330); call move (500,210); call draw (500,330); call move (40,220); call color (2); call outstring ("METHODES"); call move (152,220); call outstring ("NB ELEMENTS"); call move (280,220); call outstring ("COUT MOYEN"); call move (390,220); call outstring ("COUT MAXIMUM"); call move (510,220); call outstring ("PERFORMANCE"); call move (522,230); call outstring ("en %"); call aff_nb(160,260,nbelems,3,15); call aff_nb(160,300,nbelems,3,15); calcule_cmb := entier((nbelems*(nbelems-1)) / 2); calcule_cmq := entier(2*(ln (nbelems) / ln (10))*nbelems); call aff_nb(550,300,ind_perfb,2,15); call aff_nb(550,260,ind_perfq,2,15); call aff_nb(290,300,calcule_cmb,4,15); call aff_nb(290,260,calcule_cmq,3,15); call aff_nb(410,260,cout_maxq,3,15); call aff_nb(410,300,calcule_cmb,4,15); call color (2); call move (35,260); call outstring ("QUICK SORT"); call move (35,300); call outstring ("BUBBLE SORT"); read (choix); call EFFACE (0,0,639,349,9,7,15); end; unit AFF_TRI : procedure(choix_courant,nbelems: integer); begin pref STR_ELEMENTS block var CONTINUE : boolean, choix : char, TAB1,TAB2 : STR_ELEMENTS, i,rand,det_coul,essai, nb_perm,nb_iterationsq,nb_iterationsb : integer; begin nb_perm := 0; nb_iterationsq := 0; nb_iterationsb := 0; CONTINUE := false; call EFFACE (0,0,639,349,9,7,15); case choix_courant when 1: TAB1 := new HISTOGRAMMES (nbelems); TAB2 := new HISTOGRAMMES (nbelems); when 2: TAB1 := new POLY (nbelems); TAB2 := new POLY (nbelems); when 3 : TAB1 := new SURFACES (nbelems); TAB2 := new SURFACES (nbelems); esac; call AFF_RENS; call TAB1.randomize; call TAB2.copie(TAB1); for i := 0 to nbelems-1 do call TAB1.trace (i,105); call TAB2.trace (i,280); od; call QUICK_SORT (0,nbelems-1,TAB1,nb_perm,nb_iterationsq); call AFF_RENS_FIN; nb_perm := 0; call TAB1.killtab; kill (TAB1); call bubble_sort(nbelems-1,TAB2,nb_perm,nb_iterationsb); call AFF_RENS_FIN2; call TAB2.killtab; kill (TAB2); read (choix); CONTINUE:=BOX_MESSAGE("Voulez-vous les statistiques des tris ?", 150,75,500,200); if ( CONTINUE) then call EFFACE (0,0,639,349,9,7,15); call STATS(nb_iterationsq,nb_iterationsb,nbelems); else call EFFACE (0,0,639,349,9,7,15); exit; fi; end; end AFF_TRI; unit SWAP : procedure (indice1 , indice2 : integer ; inout T2 : STR_ELEMENTS;inout nb_perm : integer); begin pref STR_ELEMENTS block var temp1,temp2,coul1,coul2,hauteur1,hauteur2 : integer; begin nb_perm := nb_perm + 1; call aff_nb (560,120,nb_perm,4,1); call T2.echange (indice1,indice2,105); end; end SWAP; unit QUICK_SORT : procedure (gauche,droite : integer ; inout T : STR_ELEMENTS; inout nb_perm,nb_iterations :integer); begin pref STR_ELEMENTS block var moy,ibas,ihaut : integer ; begin (* initialisation des indices bas et haut *) ibas := gauche; ihaut := droite; (* choix d'une valeur mediane *) moy := (gauche + droite) div 2; (* echange pour que valeurs gauches <= pivot <= valeurs droites *) do (* recherche de la premiere valeur de gauche mal placee *) while (T.compare (ibas,moy)=-1) do ibas := ibas + 1; nb_iterations := nb_iterations + 1; od; (* recherche de la premiere valeur de droite mal placee *) while (T.compare (moy,ihaut)=-1) do ihaut := ihaut - 1; nb_iterations := nb_iterations + 1; od; call aff_nb(560,140,nb_iterations,4,1); (* echange eventuel de 2 valeurs mal classees *) if ibas <= ihaut then call SWAP (ibas,ihaut,T,nb_perm); if ibas = moy then moy := ihaut; else if ihaut = moy then moy := ibas; fi; fi; ibas := ibas + 1; ihaut := ihaut - 1; fi; if ibas > ihaut then exit; fi; od; (* recursion si les sous-intervalles ne sont pas d‚j… tri‚s *) if ihaut > gauche then call QUICK_SORT (gauche,ihaut,T,nb_perm,nb_iterations); fi; if ibas < droite then call QUICK_SORT (ibas,droite,T,nb_perm,nb_iterations); fi; end; end QUICK_SORT; unit bubble_sort : procedure (n : integer;inout T : STR_ELEMENTS; inout nb_perm,nb_iterations : integer); var i,j : integer, triok : boolean; begin i:=n; (* tant que le tableau n'est pas entiŠrement tri‚ *) while (i>=0) and not triok do triok := true; (* tri du sous-tableau *) for j := 0 to i-1 do nb_iterations := nb_iterations + 1; call aff_nb (560,315,nb_iterations,4,1); (* ordonner 2 ‚l‚ments *) if T.compare(j,j+1) = 1 then nb_perm := nb_perm + 1; call aff_nb (560,295,nb_perm,4,1); call T.echange(j,j+1,280); triok := false; fi; od; i := i-1; od; end bubble_sort; begin pref STR_ELEMENTS block (********************************************************************) (* PROGRAMME PRINCIPAL *) (********************************************************************) begin call gron(NOCARD); (* installation du pilote graphique *) call rectangle_plein (0,0,639,349,7,7); call pallet (7); call CHARGE_FOND; call CHOIX_UTIL ; call EFFACE (0,0,639,349,9,7,15); call groff; end; end; end; end; end TRI;