Please enable JavaScript to view this site.

ESL Documentation

MATHLIB Function

Returns the result of a bitwise "XOR" operation.

OR(X_IV, Y_IV)

X_IV

An integer number whose bit settings you wish to check.

Y_IV

An integer number "Mask" containing the value for the bit(s) you wish to toggle.

Description

The bitwise functions are designed to allow an Esl application to use System API's where individual bits within an integer are used as flags, without the need to write an external routine.

Use this function to swap a bit(s) within an integer from zero to 1, or from 1 to zero (i.e. toggle). The bit(s) to be toggled is/are determined by the value of the "Mask" integer. The function returns the value of the bitwise XOR operation. If you wish to toggle all the bits within an integer use the "Mask" value of -1, as this has all the bits set to 1.