Jane Austen's peculiarity

Richmond richmondmathewson at gmail.com
Sat Aug 8 23:44:51 CEST 2015


on mouseUp
    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
   end repeat
   put char 1 to -2 of relevantLines into fld "COOKED"
end mouseUp

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 
pretList then
         put (the number of lines of word 1 to w of pText) & comma after 
outList
      end if
   end repeat
   return char 1 to -2 of outList
   end findWere


          executing at 12:43:43 AM
Type    Function: error in function handler
Object    Brigham
Line    put wordOffsets("were", pText, true) into offList
Hint    wordOffsets

Something either I don't understand (obviously your 'Logic' and my 
'Logic' are not sitting well together).

Richmond.



More information about the use-livecode mailing list