BitOnInteger and BitOrInteger (Float functions)

From m204wiki
Revision as of 20:19, 1 November 2012 by JAL (talk | contribs) (→‎Syntax terms)
Jump to navigation Jump to search

Bitwise Or of integers (Float class)

[Introduced in Sirius Mods 7.9]


These intrinsic functions perform a logical OR of the bits of two integers, that is, output bits are "on" if they are "on" in either of the inputs.

Syntax

%result = float:BitOnInteger( onBits)

%result = float:BitOrInteger( orBits)

Syntax terms

%resultA variable to receive the result of ORing together the bits of float and onBits or orBits.
floatOne of the integers to be ORed.
onBitsThe other integer to be ORed.
orBitsThe other integer to be ORed.

Usage notes

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

Examples

  1. The following statement rounds an integer up to the nearest odd integer:

    %y = %x:bitOnInteger(1)

See also