|
|
Line 1: |
Line 1: |
| {{Template:Float:BitOnInteger subtitle}}
| | #REDIRECT [[BitOnInteger and BitOrInteger (Float functions)]] |
| | |
| The <var>BitOnInteger</var> [[Intrinsic classes|intrinsic]] function turns on the set of bits in one integer that are on in another. It is an alias for the <var>[[BitOrInteger (Float function)|BitOrInteger]]</var> function.
| |
| | |
| | |
| ==Syntax==
| |
| {{Template:Float:BitOnInteger syntax}}
| |
| ===Syntax terms===
| |
| <table class="syntaxTable">
| |
| <tr><th>%result</th><td>A variable to receive the result of turning on the bits of <var class="term">onBits</var> in <var class="term">float</var>.</td></tr>
| |
| <tr><th>float</th><td>The float to turn on bits in.</td></tr>
| |
| | |
| <tr><th>onBits</th><td>The bits to turn on.</td></tr>
| |
| | |
| </table>
| |
| | |
| ==Usage notes==
| |
| <ul><li>The <var>BitOnInteger</var> function is available as of <var class="product">[[Sirius Mods]]</var> Version 7.9</ul>
| |
| | |
| ==Examples==
| |
| | |
| <ol><li>The following statement rounds an integer up to the nearest odd integer:
| |
| <p class="code">%y = %x:bitOnInteger(1)
| |
| </p></ol>
| |
| | |
| | |
| ==See also==
| |
| {{Template:Float:BitOnInteger footer}}
| |