Skip to content

Commit 93914df

Browse files
author
Sylvain Maltais
committed
Ajustement de présentation pour Turbo Pascal
1 parent d38b9e1 commit 93914df

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

HANOIS.PAS

+15-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ Uses Crt;
1010

1111
Procedure Main;
1212
Const
13-
C:Array[1..7]of Char='=======';
13+
C:Array[1..7]of Char=
14+
{$IFDEF FPC}
15+
'======='
16+
{$ELSE}
17+
Char(177)+Char(177)+Char(177)+Char(177)+Char(177)+Char(177)+Char(177)
18+
{$ENDIF};
19+
C2:Array[1..7]of Char=
20+
{$IFDEF FPC}
21+
'======='
22+
{$ELSE}
23+
Char(178)+Char(178)+Char(178)+Char(178)+Char(178)+Char(178)+Char(178)
24+
{$ENDIF};
1425
XD:Array[1..3]of Byte=(9,25,41);
1526
Var
1627
A:Array[1..3,0..8]of Byte;
@@ -28,12 +39,13 @@ Begin
2839
For X:=1to 3do Begin
2940
Z:=A[X,I];
3041
If Z=0Then Begin
31-
GotoXY(XD[X]-7,Y); Write(' ':7,'I',' ':7);
42+
GotoXY(XD[X]-7,Y); Write(' ':7,{$IFDEF FPC}'I'{$ELSE}Chr(219){$ENDIF},' ':7);
3243
End
3344
Else
3445
For J:=XD[X]-Z to XD[X]+Z do Begin
3546
GotoXY(J,Y);
36-
Write(C[Z]);
47+
If Odd(Z)Then Write(C[Z])
48+
Else Write(C2[Z]);
3749
End;
3850
End;
3951
End;

0 commit comments

Comments
 (0)