What do you want to contribute?

Geoff Canyon gcanyon at gmail.com
Tue Feb 19 00:04:28 EST 2013


w is a string, but I'm assuming that in context, syntax like "count of"
would make sense syntactically, and that the language could make it work.

yeah, commonest sucks, but I didn't want to push it by going with two words
like "most common." Also, given how specific the use case is, it would
likely not work as syntax.

"for each" seems like a reasonable synonym for "repeat for each,"

Your example seems like a reasonable alternative. My goal wasn't to define
the one true syntax for this example, but just to throw out some
alternatives to suggest what I think should be possible. In practice,
whatever makes sense to enough people will be the syntax that survives.


On Mon, Feb 18, 2013 at 8:58 PM, Monte Goulding <monte at sweattechnologies.com
> wrote:

> Hmm... is w something more than a string... how could it have a count?
>
> SQL uses distinct... might be good to use that...
>
> commonest??? ;-)
>
> Also... why are we dropping repeat?
>
> Here's something nice: ordered repeats ;-)
>
> How about:
>
> put file filePath into fileString
> filter the characters of fileString with "(?i)[a-z]"
> repeat for each distinct word theWord with count theCount ordered by
> theCount numeric descending
>    put theWord,theCount &cr after theList
>    if the number of lines of theList = 10 then exit repeat
> end repeat
>
> --
> M E R Goulding
> Software development services
> Bespoke application development for vertical markets
>
> mergExt - There's an external for that!
>
> _______________________________________________
> 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