Operator_OrRight Method

Used to overload the Or operator, providing custom functionality.

Syntax

# Notes

Create an Operator_OrRight function in a class to specify the functionality of the Or operator for that class. Operator_OrRight assumes that the Self instance of the class is on the right and the passed instance is on the left.

In the function, the Self instance the right operand and the other operand is passed as a parameter.

The ordinary methods are always preferred; REALbasic uses the Right versions only if there is no legal left version.

# Example

Suppose you define a class myResult with the property a as Boolean. Operator_OrRight is defined as:

Function Operator_OrRight(lhs as MyResult) as Boolean
Return lhs.a Or Self.a

# See Also

Or operator, Operator_Or function.