I did not know this! Isn’t anyone else shocked and surprised??
Bob S
On Jan 22, 2021, at 2:33 PM, Ken Ray via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:
On Jan 21, 2021, at 8:36 AM, Keith Clarke via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:
Thanks Brian. I
> On Jan 21, 2021, at 8:36 AM, Keith Clarke via use-livecode
> wrote:
>
> Thanks Brian. I looked at matchChunk in the dictionary & it seems to return a
> boolean, rather than the offset.
The boolean is just whether or not the matchChunk operation was successful; you
need to provide
Always remember who is the computer, and who is the coder!
The computer may need to perform a loop under the hood, but that doesn't
mean you need to use the "repeat" keyword.
It's often cleaner/faster when you don't. For those who value concise
code and good performance in LiveCode, avoid
Ah, thanks, Brian - re-reading more carefully, I see how the first item in the
positionVarsList would provide the offset of the first non-tab character.
Re prettification, I’m trying to create a quick & dirty tool to process a set
of comma-delimited query strings - to see their common patterns.
Just to clarify my suggestion, it isn’t the return value that you would use
(other than to check for success), but the third variable in the call that has
the position that you would be looking for.
When you say that you are prettifying... are you doing something to adjust each
tab in the
Thanks Brian. I looked at matchChunk in the dictionary & it seems to return a
boolean, rather than the offset.
Thanks all - I’ve stopped trying to find the syntax for ‘find any char but
this’ in offset and instead, taken Dick’s advice to iterate through the chars
and count the loops until
You could also use matchChunk with a regular expression that excludes the tab
character.
Sent from my iPhone
> On Jan 21, 2021, at 7:14 AM, Keith Clarke via use-livecode
> wrote:
>
> Ah yes indeed, I’d forgotten I could test with 'put not(tab)’ in the message
> box - that certainly proves
Ah yes indeed, I’d forgotten I could test with 'put not(tab)’ in the message
box - that certainly proves the syntax was wrong! :-)
Best,
Keith
> On 21 Jan 2021, at 10:49, Dick Kriesel via use-livecode
> wrote:
>
>
>
>> On Jan 21, 2021, at 2:34 AM, Keith Clarke via use-livecode
>> wrote:
>
> On Jan 21, 2021, at 2:34 AM, Keith Clarke via use-livecode
> wrote:
> I was just keen to understand why offset wasn’t happy with the ‘not(tab)’ in
> this instance.
expression "not(tab)" evaluates to true, which doesn’t serve your purpose
— Dick
Thanks Dick, this would definitely work - and I’m iterating through characters
and lines anyway as I attempt to prettify a long data string for eased human
readability.
I was just keen to understand why offset wasn’t happy with the ‘not(tab)’ in
this instance.
Best,
Keith
> On 21 Jan 2021,
> On Jan 21, 2021, at 2:25 AM, Dick Kriesel via use-livecode
> wrote:
>
> Hi, Keith. You could test each character until you find a tab:
>
correction: until you find one that’s not a tab
___
use-livecode mailing list
> On Jan 21, 2021, at 1:30 AM, Keith Clarke via use-livecode
> mailto:use-livecode@lists.runrev.com>> wrote:
>
> Please can anyone advise on the correct syntax for trying to find the first
> non-tab character offset in a string
Hi, Keith. You could test each character until you find a tab:
Hi folks,
Please can anyone advise on the correct syntax for trying to find the first
non-tab character offset in a string, as 'offset(not(tab), tString)’ seems to
be returning strange results - i.e. a number but not the correct one?
Best,
Keith
13 matches
Mail list logo