When solving a problem with a given data structure makes your head hurt, that may be an indication that your head's fine and the problem is with the data structure. :)

Can you tell us a bit more about your goal with this?

In your example output, if we look at this line:

   WordLocationA["Cut"][1][100,320]

What do these numbers signify?

And what will you be doing with this index once you have it?

--
 Richard Gaskin
 Fourth World Systems


Sannyasin Brahmanathaswami wrote:

> My head always breaks on complex array functions. I can't head around
> this algorithm
>
> Given a "quote"  in a field
>
> "Cut the apple. Cut the banana"
>
> We get to location for each word (that is easy)
>
> I want to analyse the quote by going through each word.
>
> *----------*
>
> *repeat* withx = 1tothenumberofwordsoffld"_quote"
>
>     # get the location of the word, put it into variable tWordLocation
>
>     put tWordLocation to the WordLocationA[x][??][tWordLocation]
>
> end repeat
>
> -------
>
> that we end with
>
> WordLocationA["Cut"][1][100,320]
> WordLocationA["Cut"][2][300,320]
> WordLocationA["the"][1][200,320]
> WordLocationA["the"][2][400,320]
> WordLocationA["apple"][2][500,320]
> WordLocationA["banana"][2][500,320]
>
> the "part" where incrementing the numeric key inside the repeat loop,
> "inside" the key,  I can't get.



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

Reply via email to