Sannyasin Brahmanathaswami via use-livecode
2018-09-18 15:41:19 UTC
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
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