2019-09-21 14:59:48 -07:00
|
|
|
// Test PascaLIGO arithmetic operators
|
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function mod_op (const n : int) : nat is n mod 42
|
2019-05-12 20:56:22 +00:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function plus_op (const n : int) : int is n + 42
|
2019-05-12 20:56:22 +00:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function minus_op (const n : int) : int is n - 42
|
2019-05-12 20:56:22 +00:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function times_op (const n : int) : int is n * 42
|
2019-05-12 20:56:22 +00:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function div_op (const n : int) : int is n / 2
|
2019-05-12 20:56:22 +00:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function int_op (const n : nat) : int is int (n)
|
2019-07-19 12:13:09 +02:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function neg_op (const n : int) : int is -n
|