$BitOr: Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
m (misc formatting) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Bitwise OR of two integers</span> | <span class="pageSubtitle">Bitwise OR of two integers</span> | ||
<p class="warn"><b>Note: </b> | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the <var>$BitOr</var> function is the <var>[[BitOrInteger (Float function)|BitOrInteger]]</var> function. There is also an OO <var>[[BitOrString (String function)|BitOrString]]</var> function.</p> | ||
The <var>$BitOr</var> function returns an integer which is the bitwise OR of two integers. | The <var>$BitOr</var> function returns an integer which is the bitwise OR of two integers. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="term">%result</span> = <span class="literal">$BitOr</span>(<span class="term">int_1</span>, <span class="term">int_2</span>) | <p class="syntax"><span class="term">%result</span> = <span class="literal">$BitOr</span>(<span class="term">int_1</span>, <span class="term">int_2</span>) | ||
</p> | </p> | ||
<p> | <p> | ||
<var class="term">%result</var> is set to the bitwise OR of the two arguments.</p> | <var class="term">%result</var> is an integer that is set to the bitwise OR of the two <var>$BitOr</var> arguments. If an argument is missing, <var class="term">%result</var> defaults to 0. </p> | ||
<p> | |||
The first and second arguments are both integers, and their default values are 0. If an argument value is invalid, it is treated as a 0. </p> | |||
==Example== | ==Example== | ||
Line 27: | Line 25: | ||
<li>[[List of $functions|Sirius functions]]</li> | <li>[[List of $functions|Sirius functions]]</li> | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[ | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[ | <li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li> | ||
<li>[[Janus Sockets]]</li> | <li>[[Janus Sockets]]</li> | ||
<li>[[Janus Web Server]]</li> | <li>[[Janus Web Server]]</li> | ||
<li>Japanese functions</li> | <li>Japanese functions</li> | ||
<li>[ | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$BitOr]] | [[Category:$Functions|$BitOr]] |
Latest revision as of 16:03, 10 January 2018
Bitwise OR of two integers
Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $BitOr function is the BitOrInteger function. There is also an OO BitOrString function.
The $BitOr function returns an integer which is the bitwise OR of two integers.
Syntax
%result = $BitOr(int_1, int_2)
%result is an integer that is set to the bitwise OR of the two $BitOr arguments. If an argument is missing, %result defaults to 0.
The first and second arguments are both integers, and their default values are 0. If an argument value is invalid, it is treated as a 0.
Example
The following program will print the value 7:
B Print $BitOr(6, 3) End