Page 1 of 1
What is after what?
Posted: Mon Aug 01, 2022 1:16 pm
by richmond62
I am poking around in fields . . .
Code: Select all
on mouseUp
if fld "ff" contains "L" then
put the char after char "K" in fld "ff"
end if
end mouseUp
Does not work . . .
So, I would be grateful if someone could help me to detect
the character after another character in a field.
Re: What is after what?
Posted: Mon Aug 01, 2022 2:38 pm
by dunbarx
Richmond.
Your syntax is all wrong. There is no construction in LC to "put the char after char..."
You just made that up.
Something like this:
Code: Select all
put char offset("K",fld "ff") + 1 of fld "ff"
Craig
Re: What is after what?
Posted: Mon Aug 01, 2022 2:43 pm
by dunbarx
Richmond.
This last will only find the char following the first instance of a "K". Is that enough?
Craig
Re: What is after what?
Posted: Mon Aug 01, 2022 2:45 pm
by dunbarx
Richmond.
I am starting to post like you do.
Let me know if you need to find all the chars following ALL the "K"s
Craig
Re: What is after what?
Posted: Mon Aug 01, 2022 2:50 pm
by richmond62
Experiencing internet probs right now, so will do as
you suggest and revert just as soon as internet sorted out.
Telephone uses different ISP to our computers . . .
Re: What is after what?
Posted: Mon Aug 01, 2022 3:10 pm
by richmond62
Of course I made that up, but at least it sufficed
enough for you to understand what I wanted tdo.
AND your code works perfectly.
Thank you very much indeed.