$StrOr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 53: Line 53:
<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>[[Media: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>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>

Revision as of 22:11, 19 February 2015

Bit-wise OR two strings

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StrOr function is the BitOrString (String function).

This function performs a bit-wise OR of two strings.

The $StrOr function accepts three arguments and returns a string result that is the bit-wise OR of the first two arguments, the shorter being padded with as many copies of the third argument as are required to make the string lengths equal.

Syntax

%STR = $StrOr(string1, string2, [pad])

Syntax terms

%str The bit-wise AND of string1 and string2.
string1 An arbitrary string.
string2 Another arbitrary string.
pad An arbitrary string that is appended to the shorter of the first two strings and replicated as many times as required to make the strings of equal length. If this value is not specified or is null, it defaults to a single null byte (X'00').

Examples

  1. This code fragment would set %junk to X'756333445566':

    %X = $X2C('112233445566') %Y = $X2C('654321') %junk = $StrOr(%X, %Y)

  2. These statements would set %junk to X'DDEEFFCCDDEE':

    %X = $X2C('112233445566') %junk = $StrOr(%X, , $X2C('CC'))

  3. This code fragment would set %junk to X'1122FF44FF66':

    %X = $X2C('112233445566') %Y = $X2C('1122') %Z = $X2C('FF00') %junk = $StrOr(%X, %Y, %Z)

Products authorizing $StrOr