Caché ObjectScript Reference
$ZBITOR (legacy function)
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   

Bitstring function – OR.
This page describes the legacy function $ZBITOR. It is described here for compatibility with legacy applications.
$ZBITOR returns a bitstring formed by the (bitstring1 OR bitstring2) operation. The length of the resulting bitstring equals the longer length of the two bitstrings. The value of the resulting bitstring is 1 in all positions where either or both of the bitstrings held a 1, and 0 in all other positions. Bitstrings are compared left-to- right.
If bitstring1=[0,0,1,1,0] and bitstring2=[0,1,1,0], then the result of $ZBITOR would be [0,1,1,1,0]. That is:
Position 1: 0 OR 0 = 0
Position 2: 0 OR 1 = 1
Position 3: 1 OR 1 = 1
Position 4: 1 OR 0 = 1
Position 5: 0 OR null = 0
See Also