$BitAnd: Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
m (minor word change) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Bitwise AND of two integers</span> | <span class="pageSubtitle">Bitwise AND 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>$BitAnd</var> function is the <var>[[BitAndInteger (Float function)|BitAndInteger]]</var> function. There is also an OO method for strings called <var>[[BitAndString (String function)|BitAndString]]</var>.</p> | ||
The <var>$BitAnd</var> function returns an integer which is the bitwise AND of two integers. | The <var>$BitAnd</var> function returns an integer which is the bitwise AND of two integers. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="term">%result</span> = <span class="literal">$BitAnd</span>(<span class="term">int_1</span>, | <p class="syntax"><span class="term">%result</span> = <span class="literal">$BitAnd</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 AND of the two arguments.</p> | <var class="term">%result</var> is set to the bitwise AND of the two <var>$BitAnd</var> arguments.</p> | ||
<p> | |||
The first and second arguments are both integers | The first and second arguments are both integers, and their default values are 0. An invalid value specified for an argument is treated as a 0.</p> | ||
==Example== | ==Example== | ||
Line 25: | Line 24: | ||
==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|$BitAnd]] | [[Category:$Functions|$BitAnd]] |
Latest revision as of 15:53, 10 January 2018
Bitwise AND of two integers
Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $BitAnd function is the BitAndInteger function. There is also an OO method for strings called BitAndString.
The $BitAnd function returns an integer which is the bitwise AND of two integers.
Syntax
%result = $BitAnd(int_1, int_2)
%result is set to the bitwise AND of the two $BitAnd arguments.
The first and second arguments are both integers, and their default values are 0. An invalid value specified for an argument is treated as a 0.
Example
The following program will print the value 2:
B Print $BitAnd(-2, 3) End