BitAndInteger (Float function): Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Template:Float:BitAndInteger subtitle}} The <var>BitAndInteger</var> intrinsic function performs a logical AND on the bits of two integers. ==Syntax== {...") |
m (→Examples) |
||
Line 18: | Line 18: | ||
==Examples== | ==Examples== | ||
The following statement checks whether the least significant bit of an integer is set. It sets %y to 1 if %x is odd and 0 if %x is even: | |||
<p class="code">%y = %x:bitAndInteger(1) | <p class="code">%y = %x:bitAndInteger(1) | ||
</p | </p> | ||
==See also== | ==See also== | ||
{{Template:Float:BitAndInteger footer}} | {{Template:Float:BitAndInteger footer}} |
Latest revision as of 21:46, 21 July 2011
Do bitwise And of integers (Float class)
[Introduced in Sirius Mods 7.9]
The BitAndInteger intrinsic function performs a logical AND on the bits of two integers.
Syntax
%result = float:BitAndInteger( andBits)
Syntax terms
%result | A variable to receive the result of ANDing together the bits of float and andBits. |
---|---|
float | One of the floats to be ANDed. |
andBits | The other float to be ANDed. |
Usage notes
- The BitAndInteger function is available as of Sirius Mods Version 7.9
Examples
The following statement checks whether the least significant bit of an integer is set. It sets %y to 1 if %x is odd and 0 if %x is even:
%y = %x:bitAndInteger(1)