PROCEDURE POUR DESSINER UN RECTANGLE

elguevel Messages postés 718 Date d'inscription jeudi 19 décembre 2002 Statut Membre Dernière intervention 22 novembre 2016 - 24 juil. 2006 à 15:50
f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 - 24 juil. 2006 à 17:38
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/38755-procedure-pour-dessiner-un-rectangle

f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 35
24 juil. 2006 à 17:38
marrant j'avais fait ça y'a onze ans :


type
TLineModel : array[0..5] of char;

const
BasicLine : TLineModel = ('+','+','+','+','-','|');
SimpleLine : TLineModel = (#201,#200,#187,#188,#205,#186);
DoubleLine : TLineModel = (#218,#192,#191,#217,#196,#179);

procedure DrawCadre(const X1,Y1,X2,Y2 : integer; const Model : TLineModel);
var i : integer;
begin
GotoXY(X1,Y1); write(Model[0]);
GotoXY(X1,Y2); write(Model[1]);
GotoXY(X2,Y1); write(Model[2]);
GotoXY(X2,Y2); write(Model[3]);
for i := X1+1 to X2-1 do begin
GotoXY(i,Y1); write(Model[4]);
GotoXY(i,Y2); write(Model[4]);
end;
for i := Y1+1 to Y2-1 do begin
GotoXY(X1,i); write(Model[5]);
GotoXY(X2,i); write(Model[5]);
end;
end;


mais bon ... pour une raison qui m'echape encore j'avais fait ça aussi :

Function MAJ(s : string) : string;
var x : byte;
Begin
For x := 1 to length(s) do begin
s[x] := upcase(s[x]);
end;
maj := s;
End;
elguevel Messages postés 718 Date d'inscription jeudi 19 décembre 2002 Statut Membre Dernière intervention 22 novembre 2016 3
24 juil. 2006 à 15:50
Ahh çà va pas recommencer !!!?
Rejoignez-nous