Logical operands (AND, OR, XOR etc)

Is possible to perform the following operation:

a := b and c

or any logical operations on variables?

No, there are no builtin “logical operators” or functions within NATURAL.

@WoWi: By the way: How would you do an XOR in Natural?

One can mimic all of the logical operators by taking individual bytes (regardless of the basic NATURAL data type), blow it up to 8 bytes, each representing a bit, apply the logical operators “bitwise”, then stash the 8 “bits” back into a single byte.

That way it doesn’t matter which of the logical operator you apply, XOR works just like AND and OR (or should that read AND or OR ? :wink: )

Shouldn’t be too difficult to create a subroutine or copycode for this.