Re: Interesting wordOffset behavior

2012-12-04 Thread Peter Haworth
How about the topLeft, which is actually the left followed by the top. Pete On Dec 4, 2012 8:04 AM, "Richard Gaskin" wrote: > > My personal favorite example is allowing property syntax for functions > (e.g., "the acos of " vs. "acos()"), but LiveCode is not > without its own unique anomalies, li

Re: Interesting wordOffset behavior

2012-12-04 Thread Richard Gaskin
Peter M. Brigham wrote: > Probably Richard Gaskin can tell us the history behind this, > clearly a leftover from HC. No doubt. I got nothing on this one specifically, other than the precedence order Alex noted. While this is a common side-effect of a flexible left-to-right parser, easily mad

Re: Interesting wordOffset behavior

2012-12-04 Thread Peter M. Brigham
Ah! Caught again by not using parens. Evaluation order is one of the things that I miss sometimes. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Dec 4, 2012, at 5:33 AM, Alex Tweedly wrote: > try > > put word 2 of ("one"& tab& "two"& tab& "three") > > What

Re: Interesting wordOffset behavior

2012-12-04 Thread Alex Tweedly
try put word 2 of ("one"& tab& "two"& tab& "three") What you are getting is word 2 of "one" followed by tab& "two"& tab& "three" -- Alex. On 04/12/2012 03:34, Peter M. Brigham wrote: Yeah, it doesn't really behave properly. If you do put word 2 of "one"& tab& "two"& t

Re: Interesting wordOffset behavior

2012-12-03 Thread Peter M. Brigham
Yeah, it doesn't really behave properly. If you do put word 2 of "one" & tab & "two" & tab & "three" you get twothree and put word 2 of "one" & cr & "two" & cr & "three" gives you twothree It really should consider any white space as a word delimiter. Sigh. Probably Richard Gaskin can te

Re: Interesting wordOffset behavior

2012-12-03 Thread Robert Sneidar
Wordoffset returns space delimited data. Bob On Dec 3, 2012, at 10:36 AM, Peter Haworth wrote: > I'm finding that wordOffset treats comment chars as a word even if they > are immediately followed by another character. > > For example: > > wordOffset("--","repeat with x=1 to 100 --check somet

Re: Interesting wordOffset behavior

2012-12-03 Thread Peter Haworth
Thanks Mark. I knew there must be a logical explanation for it! Pete lcSQL Software On Mon, Dec 3, 2012 at 12:39 PM, Mark Schonewille < m.schonewi...@economy-x-talk.com> wrote: > Hi Pete, > > It will return 0 if you set the wholeMatches to true. > > -- > Best regards, >

Re: Interesting wordOffset behavior

2012-12-03 Thread Mark Schonewille
Hi Pete, It will return 0 if you set the wholeMatches to true. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ,

Interesting wordOffset behavior

2012-12-03 Thread Peter Haworth
I'm finding that wordOffset treats comment chars as a word even if they are immediately followed by another character. For example: wordOffset("--","repeat with x=1 to 100 --check something") ...returns 6. I would have expected it to return zero since there is no occurrence of "--" surrounded b