summaryrefslogtreecommitdiff
path: root/fpcdocs/refex/ex69.pp
blob: 0ebb1dac699460196bc31b672c0bfa67cd513616 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Program Example69;

{ Program to demonstrate the Swap function. }
Var W : Word;
    L : Longint;

begin
  W:=$1234;
  W:=Swap(W);
  if W<>$3412 then
    writeln ('Error when swapping word !');
  L:=$12345678;
  L:=Swap(L);
  if L<>$56781234 then
    writeln ('Error when swapping Longint !');
end.