Intersecting data question/challenge

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Jul 8 15:13:53 EDT 2005


Hello Dennis,

You are right.
I was a little bit fast.
At least more than 2 repeat loops ;-)

Le 8 juil. 05 à 20:50, Dennis Brown a écrit :

> Yes, I looked at the intersect command, but it performs the action  
> on the keys not the data from a list.  I would have to create an  
> array element for each integer in the list with the integer as the  
> key.  Sounded like two loops that would run even slower than my  
> example:
>
> repeat for each item theItem in list1
>   put empty into myArray1[theItem]
> end repeat
> repeat for each item theItem in list2
>   put empty into myArray2[theItem]
> end repeat
> intersect myArray1 with myArray2
> if the keys of myArray1 is empty then get false else get true
>
> In actual practice, the above example runs 3 times slower than the  
> below example for the sample data shown.
>
> However, knowing that Rev had such a command for the keys, I  
> thought perhaps someone knew of a more clever way to use it, or  
> maybe there was another way to intersect data.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list