~ (value -- invertedValue)invertedValue: Inverted value in the same schema.~ is unary: it consumes one value and returns one value of the same schema.
For Cond, it performs logical NOT. For Whole values, it performs bitwise complement. Arithmetic negation is provided by neg.
xor with TRUE.xor with the all-bits-set value of the same schema.5 ~ therefore produces -6.{} () {} [
"-- cond --" printCompilerMessage
TRUE ~ printStack _:;
FALSE ~ printStack _:;
unknownCond: FALSE dynamic;
unknownCond ~ printStack _:;
"-- nat8 --" printCompilerMessage
0n8 ~ printStack _:;
0xF0n8 ~ printStack _:;
"-- int32 --" printCompilerMessage
5 ~ printStack _:;
-1 ~ printStack _:;
unknownInt: 0 dynamic;
unknownInt ~ printStack _:;
] "main" exportFunction
-- cond --
FALSE
TRUE
Cond
-- nat8 --
255n8
15n8
-- int32 --
-6
0
Int32
and builtin (leftOperand rightOperand -- combinedValue) Combines two Cond or Whole values with bitwise or logical AND semantics.lshift builtin (value shiftCount -- shiftedValue) Performs a bitwise left shift on a Whole value and keeps the same schema.or builtin (leftOperand rightOperand -- combinedValue) Combines two Cond or Whole values with bitwise or logical OR semantics.rshift builtin (value shiftCount -- shiftedValue) Performs a bitwise right shift on a Whole value and keeps the same schema.xor builtin (leftOperand rightOperand -- combinedValue) Combines two Cond or Whole values with logical exclusive-OR or bitwise XOR semantics.