mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 14:59:29 +02:00
17 lines
304 B
ObjectPascal
17 lines
304 B
ObjectPascal
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.
|