Jane Austen's peculiarity
richmondmathewson at gmail.com
Sat Aug 8 17:44:51 EDT 2015
put fld "TEKST" into TEKST
put fld "WERBS" into WERBS
put findWere(TEKST) into linesList
repeat for each item i in linesList
put line i of TEKST & cr after relevantLines
put char 1 to -2 of relevantLines into fld "COOKED"
function findWere pText
-- returns a comma-delim list of all the line offsets matching "were *ed"
-- or "were" && <a word in your preterite list>.
put fld "WERBS" into pretList
put wordOffsets("were", pText, true) into offList
repeat for each item w in offList
put word w+1 of pText into testWord
if testWord ends with "ed" or testWord is among the words of
put (the number of lines of word 1 to w of pText) & comma after
return char 1 to -2 of outList
executing at 12:43:43 AM
Type Function: error in function handler
Line put wordOffsets("were", pText, true) into offList
Something either I don't understand (obviously your 'Logic' and my
'Logic' are not sitting well together).
More information about the Use-livecode