fpc/tests/tbs/tb0676a.pp
Jonas Maebe 0904ea0c3f * added missing "end." (fixup for r46904)
git-svn-id: trunk@46906 -
2020-09-20 12:43:49 +00:00

22 lines
325 B
ObjectPascal

{ %opt=-vw -Sew }
{ %norun }
{$mode objfpc}
function SwapEndian(const AValue: Word): Word;inline;
begin
Result := Word((AValue shr 8) or (AValue shl 8));
end;
const
Value = 8008;
var
v: Word;
begin
writeln(sizeof(Value));
Writeln(HexStr(Value, 4));
v := swapendian(Value);
Writeln(HexStr(v, 4));
end.