The first implementation of binary operators have been added to WHISKR.
The available operators currently include:
AND
OR
NOT
XOR
LSHIFT
RSHIFT
All operators have passed basic testing successfully, but might not be bug-free in certain situations.
Usage
Binary operators can be used by calling the appropriate function, eg.: and(10,3) will return 2 and or(30, 5) will return 31
All operators use the C# implementation for the calculation, so should work as expected.
Limitations & Warnings
While binary operations in C# are permitted on any integral data type (byte, int, long, etc.) they will always be cast to long during parsing, except for right shifting, where the shift value will be cast to int. (Cannot shift a 64-bit number by another 64-bit number).
Binary operators
The first implementation of binary operators have been added to WHISKR.
The available operators currently include:
AND
OR
NOT
XOR
LSHIFT
RSHIFT
All operators have passed basic testing successfully, but might not be bug-free in certain situations.
Usage
Binary operators can be used by calling the appropriate function, eg.:
and(10,3)
will return 2 andor(30, 5)
will return 31Limitations & Warnings
While binary operations in C# are permitted on any integral data type (
byte
,int
,long
, etc.) they will always be cast tolong
during parsing, except for right shifting, where the shift value will be cast toint
. (Cannot shift a 64-bit number by another 64-bit number).