Pair Class | |
Provide the base class from which all X# objects containing ordered pairs of values are subclassed.
Inheritance Hierarchy
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax The Pair type exposes the following members.
Constructors
| Name | Description |
---|
| Pair |
Construct a pair.
|
TopMethods
| Name | Description |
---|
| Destroy | Free memory resources allocated for a VObject object and its derived objects. (Inherited from VObject.) |
TopFields 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:
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