$BitOr: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
m (misc formatting) |
||
(16 intermediate revisions by 3 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=" | <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 25: | Line 23: | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[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>[[Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[[Janus Open Server]]</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> | <li>Japanese functions</li> | ||
<li>[[Sir2000 Field Migration Facility]]</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