BitAndInteger (Float function)

From m204wiki
Revision as of 10:28, 30 March 2011 by John (talk | contribs) (Created page with "{{Template:Float:BitAndInteger subtitle}} The <var>BitAndInteger</var> intrinsic function performs a logical AND on the bits of two integers. ==Syntax== {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

%resultA variable to receive the result of ANDing together the bits of float and andBits.
floatOne of the floats to be ANDed.
andBitsThe other float to be ANDed.

Usage notes

  • The BitAndInteger function is available as of Sirius Mods Version 7.9

Examples

  1. 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)

See also