Anonymous user
Towers of Hanoi: Difference between revisions
m
→{{header|Pascal}}: lang tag
m (→{{header|JavaScript}}: lang tag) |
m (→{{header|Pascal}}: lang tag) |
||
Line 498:
I think it is standard pascal, except for the constant array "strPole". I am not sure if constant arrays are part of the standard. However, as far as I know, they are a "de facto" standard in every compiler.
<lang pascal> program Hanoi;▼
▲ program Hanoi;
type
TPole = (tpLeft, tpCenter, tpRight);
Line 516 ⟶ 515:
begin
MoveStack(4,tpLeft,tpCenter,tpRight);
end.</lang>
A little longer, but clearer for my taste
<lang pascal> program Hanoi;▼
▲ program Hanoi;
type
TPole = (tpLeft, tpCenter, tpRight);
Line 545 ⟶ 542:
begin
MoveStack(4,tpLeft,tpCenter,tpRight);
end.</lang>
=={{header|Perl}}==
|