FindValueAsArraySet

Joakim Schramm joakim at astrocalc.com
Tue May 9 22:53:42 CDT 2006


Ruslan,

I get very strange return value from FindValueAsArraySet, in fact it doesn't
seem to honor the "inSelection as IVSet = null" argument below when a set is
passed but treat it as if was nil. The 2 oSet.Count below gives same value.
Is this because the passed set is of type VArraySet? From previous reply
from you I understood Vset was an abstraction for VArraySet and VBitSet so
it should be OK to pass them to a Vset argument?

>From conclusions in my previous given tests I have now been able to make
FindValueAsArraySet actually return a set, but it returns too many items as
always searching whole table. I haven't tested yet to make it a Vset to see
what it returns, will do so, but want to be clear of if there is special
rules in passing VArraySet and VBitSet as all argument parameters are
defined as Vset.

Private Function FindZoneDataID(ByVal Lat As Long, ByVal Lng As Long, ByVal
SgnLat As Long, SgnLng As Long, oAllPlaces As VArraySet) As Long
Dim diffM As Long, diffP As Long, Fact As Long, Pid As Long, ptr As Long
Dim Itr As VSetIterator
Dim oSet As VSet
Dim lnk As VLink

Dim oLatPlaces As VArraySet
Dim oLngPlaces As VArraySet

Set oLngPlaces = fLngDeg.FindValueAsArraySet(Lng, oAllPlaces)
Set oSet = oLngPlaces
Debug.Print oSet.Count ' 1176

Set oLngPlaces = fLngDeg.FindValueAsArraySet(Lng)
Set oSet = oLngPlaces
Debug.Print oSet.Count ' 1176

...

Joakim



More information about the Valentina mailing list