wordOffset, repeat loop, speed?

Mark Brownell gizmotron at earthlink.net
Sun Jan 5 16:21:02 EST 2003


 Ken,

Wow!

That is funny. This code you wrote is so close to Lingo that it would almost
execute properly as it is in Director. I'll bet you hear this all the time
here.

All I need is a timer message for start of loop and end of loop to do timing
comparisons. I don't suppose it's "put the ticks" or "startTimer" & "put the
timer" ? This is so amazing. I get to learn a new language that seems almost
the same as one that I already know. What about books? I was looking at
Amazon.com for anything and I found nothing. I did discover several of the
websites that support RR. They are loaded with goodies and quite helpful.

Thank you,
Mark


on 1/5/03 3:32 PM, Ken Ray at kray at sonsothunder.com wrote:

> Mark,
> 
> Yes, I would say so. Rev is very fast, so if you did something like:
> 
> -- gWordArray is the array that will be produced after the words are found
> -- gData is the "whole chunk of text" you referred to as the main container
> 
> global gWordArray, gData
> 
> on mouseUp
> ask "What word do you want to find?"
> if it <> "" then
> FindWord it,gData
> -- you now have an array where each element is the numeric offset to the
> -- word to be found in gData
> end if
> end mouseUp
> 
> on FindWord pWord,pData
> set the wholeMatches to true
> put 0 into tStart
> put 1 into tElementNum
> repeat forever
> put wordOffset(pWord,pData,tStart) into tNum
> if tNum = 0 then exit repeat
> put tNum into gWordArray[tElementNum]
> add 1 to tElementNum
> end repeat
> end FindWord
> 
> Hope this helps,
> 
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> 




More information about the use-livecode mailing list