Intersecting data question/challenge

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Jul 8 13:41:50 EDT 2005


Hi Dennis,

You astonished me!

Are you not the guy who is fascinated by arrays?
And, may be, by the intersect command?

Le 8 juil. 05 à 19:12, Dennis Brown a écrit :

> Hello clever Rev programmers,
>
> I have a simple question or maybe it is a simple challenge.
>
> I have two lists of integers.  The list are not long, perhaps 5 to  
> 50 items e.g.:
> list1="310,423,522,211,107,340,"
> lis2="311,312,313,318,320,323,325,330,333,337,340,"
>
> I want to find if any of the items in list1 have a match in list2.
> I know I could do it with a repeat, something like this:
>
> get false
> repeat for each item theItem in list1
>   if theItem is not among the items of list2 then next repeat
>   get true
>   exit repeat
> end repeat
>
> I was wondering if it could be done faster without a repeat through  
> some Rev trick.

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