Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ThreeData Types and Operators (continued)

3.15 Bitwise Math Operators

Bitwise math operators perform bitwise operations on one or more bit patterns or binary numerals at the level of their individual bits. Operations can be performed on variables. Bitwise math operators are evaluated right-to-left. The following bitwise math operators are used in Legato:

Bitwise NOT ~ ~a
Bitwise AND & a & b
Bitwise OR | a | b
Bitwise XOR ^ a ^ b
Bitwise left shift << a << b
Bitwise right shift >> a >> b

Bitwise math operators are evaluated in their order of precedence as described in Section 3.12 Operator Precedence.

Note that the right shift operation will sign extend and fill ones from the left if the data type is a signed integer. For example, if an int is set to 0x80000000 is shifted one tot he right, the result will be 0xC0000000. On the other hand, a unsigned int, dword, the result will be 0x40000000. Literal values are considered signed by default.