offset broken?

As_Simon simon at asato-media.com
Mon Feb 24 01:21:46 EST 2014


J. Landman Gay wrote
> function getAllOffsets pData,pChar -- find all instances of a char
>    put 0 into tSkip -- start at beginning
>    repeat
>      put offset(pChar,pData,tSkip) into tNextOffset -- chars since skip 
> point
>      if tNextOffset = 0 then exit repeat -- no more found
>      add tNextOffset to tSkip -- move the marker
>      put tSkip & comma after tRes -- store it
>    end repeat
>    return tRes
> end getAllOffsets

Sweet!
In The Complete Works of William Shakespeare
There are 328987 occurrences of the letter "t"
It took 822 millisecs

Simon



--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/TestFlight-acquired-by-Apple-Android-Version-DRT-tp4676186p4676318.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list