Michael Diehr wrote:
(a side note):
The LR is a bit confusing:
Issue 1: it lists
Variant.Operator_Compare(v) as integer
yet this code won't compile:
dim v1,v2 as variant
if v1.Operator_Compare(v2) = 0 then ...
Wow, that sure is confusing. I think it's just trying to say that you
can compare Variants, and it compares the values they contain.
"Variant.Operator_Compare(v) as integerUsed to define all the comparison
operators for the Variant. If Operator_Compare is defined, it is called
whenever any of the comparison operators are used to compare the Self
instance of the class with another instance. The following comparison
operators are covered: =, <, >, <=, >=, <>. Operator_Compare returns an
integer whose meaning is as follows: <0 means that Self is less than the
passed parameter, 0 means that Self is equal to the passed parameter,
and >0 means that Self is greater than the passed parameter"
I'm not sure what this means.
Me either. I think the doc writer here is trying to explain
Operator_Compare methods in general (but bungling the job). As far as I
know, there is nothing we, as RB users, can do to define an
Operator_Compare for Variants. We define them for our own classes instead.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|