2019-09-21 14:59:48 -07:00
|
|
|
// Test PascaLIGO bitwise operators
|
|
|
|
|
2019-07-19 12:42:01 +02:00
|
|
|
function or_op (const n : nat) : nat is
|
2020-02-07 11:10:47 +01:00
|
|
|
bitwise_or(n , 4n)
|
2019-07-19 12:42:01 +02:00
|
|
|
|
|
|
|
function and_op (const n : nat) : nat is
|
2020-02-07 11:10:47 +01:00
|
|
|
bitwise_and(n , 7n)
|
2019-07-19 12:42:01 +02:00
|
|
|
|
|
|
|
function xor_op (const n : nat) : nat is
|
2020-02-07 11:10:47 +01:00
|
|
|
bitwise_xor(n , 7n)
|
2020-02-06 16:17:33 +01:00
|
|
|
|
|
|
|
function lsl_op (const n : nat) : nat is
|
2020-02-07 11:10:47 +01:00
|
|
|
bitwise_lsl(n , 7n)
|
2020-02-06 16:17:33 +01:00
|
|
|
|
|
|
|
function lsr_op (const n : nat) : nat is
|
2020-02-07 11:10:47 +01:00
|
|
|
bitwise_lsr(n , 7n)
|