You can not put the incrementing numeric key inside an associative array the 
way you want. The key of any array must be unique, and you can not have several 
instances of a key in an array. Think of the keys of the array it as the 
primary keys of a database table. It serves as a unique identifier.

Best regards
Tore Nilsen





> 18. sep. 2018 kl. 17:41 skrev Sannyasin Brahmanathaswami via use-livecode 
> <use-livecode@lists.runrev.com>:
> 
> 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.
> 
> BR
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 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

_______________________________________________
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