mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-12-27 10:29:25 +00:00
21 lines
248 B
ObjectPascal
21 lines
248 B
ObjectPascal
program ExampleBitwise;
|
|
|
|
var
|
|
value, mask: Integer;
|
|
|
|
begin
|
|
|
|
ShowText;
|
|
|
|
Writeln(BAnd(20, 123));
|
|
Writeln(Btst(20, 16));
|
|
|
|
{ compare }
|
|
Writeln(Bxor(20, 123));
|
|
Writeln(Bor(20, 123));
|
|
|
|
{bit shift }
|
|
Writeln(Bsl(20, 1));
|
|
Writeln(Bsr(20, 1));
|
|
|
|
end. |