Operator_IntegerDivideRight Method

Used to overload the \ operator, providing custom functionality.Operator_IntegerDivideRight is the same as Operator_IntegerDivide, except that the intrinsic Self is assumed to be the on the right in the division operation

Syntax

# Notes

Create an Operator_IntegerDivideRight function in a class to specify the functionality of the \ operator for that class.

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

# Example

Using the Vector class (see Operator_Add) with two Integer elements, x and y, we define an Operator_IntegerDivideRight function that divides the sum of the passed instance by the sum of the Self instance.

Function Operator_DivideRight(lhs as Vector) as Double
Dim a, b as Integer
a= Self.x + Self.y
b=lhs.x + lhs.y
Return b \a

# See Also

\ operator; Operator_IntegerDivide function.