Click or drag to resize

Pair Class

X#
Provide the base class from which all X# objects containing ordered pairs of values are subclassed.
Inheritance Hierarchy
Object
  VObject
    Pair
      Dimension
      Point
      Range
      Selection

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 CLASS Pair INHERIT VObject
Request Example View Source

The Pair type exposes the following members.

Constructors
  NameDescription
Public methodPair
Construct a pair.
Top
Methods
  NameDescription
Public methodDestroy
Free memory resources allocated for a VObject object and its derived objects.
(Inherited from VObject.)
Top
Fields
  NameDescription
Public fieldoCargo
Cargo slot.
(Inherited from VObject.)
Top
Remarks

Important! Pair is an abstract class and should not be used directly—instead, use one of its subclasses, which include Dimension, Point, Range, and Selection.
Examples
In this example, fractions are represented as ordered pairs of integers:
X#
 1CLASS Fraction INHERIT Pair
 2HIDDEN Num
 3HIDDEN Denom
 4METHOD Init(nVal1,nVal2) CLASS Fraction
 5SUPER:Init(nVal1,nVal2)
 6Num := nVal1
 7Denom := nVal2
 8METHOD Numerator() CLASS Fraction
 9RETURN SELF:Num
10METHOD Denominator() CLASS Fraction
11RETURN SELF:Denom
See Also

Reference