xtree with compare

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

xtree with compare

Post by barry.marcus »

I've inherited some Vortex code, and I'm trying to decipher it. It contains a call to xtree with a "compare" option (I think). I can't find any documentation on the use of "compare" in xtree. Here is a snippet:

<xtree insert $tech_set compare>
<xtree SET NOADD compare>
<xtree insert $app_set compare>
<$resultSet=$ret>
<count $resultSet>
<$cur=$ret>

Can someone briefly explain to me what the purpose of "compare" is in the above context. Thanks
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

xtree with compare

Post by John »

In this case "compare" is the name of the tree to use, and would just be used to keep the tree separate from any other uses. With the NOADD the result should be that items that occur just in $tech_set will have a count of 1, and those that occur in both $tech_set and $app_set will have a count of 2.
John Turnbull
Thunderstone Software
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

xtree with compare

Post by barry.marcus »

Silly me! Looking at the documentation again, it makes sense now. I guess I had some sort of tunnel vision and just *assumed* that "compare" was an undocumented option.

Thanks very much for your help John.

Barry
Post Reply