Jane Austen's peculiarity

Richmond richmondmathewson at gmail.com
Mon Aug 10 02:51:00 EDT 2015


On 09/08/15 23:03, Richard Gaskin wrote:
> Richmond wrote:
> > "Just" by loading the textFields into variables the whole script runs
> > considerably faster
>
> If you did the same with the output it'd get even faster.
>

Hmm:

on mouseUp
    put empty into fld "COOKED"
    put empty into fld "STARTT"
    put empty into fld "STOPT"
    put "started : " & the long time into fld "STARTT"
    put 1 into KTEKST
    put 1 into KCOOK
    put fld "TEKST" into TEKST
    put fld "WERBS" into WERBS
    repeat until line KTEKST of TEKST contains "finalSolution666"
       put line KTEKST of TEKST into LTEKST
       put 1 into KWERBS
       repeat until line KWERBS of WERBS contains "finalSolution666"
          put "was " & line KWERBS of WERBS into FRAZE
          put "were " & line KWERBS of WERBS into FRAZE2
          if LTEKST contains FRAZE then
             put KTEKST & " : " & LTEKST into line KCOOK of COOKED  ---!!!
             add 1 to KCOOK
          end if
           if LTEKST contains FRAZE2 then
             put KTEKST & " : " & LTEKST into line KCOOK of COOKED  ---!!!
             add 1 to KCOOK
             end if
          add 1 to KWERBS
       end repeat
       add 1 to KTEKST
    end repeat
    put COOKED into fld "COOKED"  ---!!!
    put "finished : " & the long time into fld "STOPT"
end mouseUp

modifications marked thus: ---!!!

crashed Livecode.

Richmond.




More information about the use-livecode mailing list