Filter redux

dunbarx at aol.com dunbarx at aol.com
Fri Dec 9 15:48:45 EST 2011


Again, thanks everyone. I am pretty good at munching data. I missed a syntax construct.


I play scrabble seriously. Driving home from work each day I amuse myself by taking the three letter combinations from passing license plates and making words with minimum chars. So if I see "rbd", I know I can make "bard" or "brad", both better than "beard". If I see "cwm" I know I need do nothing, since that is already a word.


Yesterday I saw "czk". I knew "zincked", and wondered what it would take to write a program to find all words that contain those three letters. With the "filter command now working, it takes three lines of code, plus four more for input/output of the data.


I love LC.


Craig Newman



-----Original Message-----
From: Dave Cragg <dave.cragg at lacscentre.co.uk>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Dec 9, 2011 10:28 am
Subject: Re: Filter



On 9 Dec 2011, at 19:15, dunbarx at aol.com wrote:

> What am I doing wrong? If I have:
> on mouseup
>   put "abcdef" into temp
>   filter temp with "c"
>   put temp
> end mouseup
> I get empty. I don't need more empty.

Filter works on lines. From the docs: "Filters each line in a container, 
removing the lines that do or don't match a pattern."

What were you hoping to get?

Dave


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list