$BitAnd: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
m (minor word change)
 
(8 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="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $BitAnd function is the <var>[[BitAndInteger (Float function)|BitAndInteger]]</var> function. There is also OO method for strings called <var>[[BitAndString (String function)|BitAndString]]</var>.</p>
<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.  
Line 9: Line 9:
<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 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 default values are 0.
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>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf 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>Japanese functions</li>
<li>Japanese functions</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p>
</p>


[[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

Products authorizing $BitAnd