Used to overload the * operator, providing custom functionality.


Create an Operator_MultiplyRight function in a class to specify the functionality of the * operator for that class.

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

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


This is not currently supported for Android.

Sample code

Using the Vector class (see Operator Add) with two Integer elements, x and y, we define an Operator_MultiplyRight function that multiplies the sum of the passed instance with the Self instance.

Function Operator_MultiplyRight(lhs As Vector) As Integer
  Var a, b As Integer
  a = Self.x + Self.y
  b = lhs.x + lhs.y

  Return b * a
End Function


All project types on all supported operating systems.

See also

* operator; Operator Multiply function.