$BitOr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (misc formatting)
 
(44 intermediate revisions by 4 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="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $BitOr function is the [[BitOrInteger (Float function)]] There is also an OO [[BitOrString (String function)]].</p>
<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 $BitOr 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.  


$BitOr accepts two arguments and returns a numeric value.
The first and second arguments are both integers. The default values are 0.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $BitOr(int_1, int_2)
<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>)
<section end="syntax" /></p>
<p class="caption">$BitOr Function
</p>
</p>
<p class="caption">%RESULT is set to the bitwise OR of the two arguments.</p>
<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==
The following program will print the value 7:
The following program will print the value 7:
<p class="code"> B
<p class="code">B
PRINT $BitOr(6, 3)
Print $BitOr(6, 3)
END
End
</p>
</p>


==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>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p class="caption">Products authorizing $BitOr
</p>


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

Products authorizing $BitOr