lineOffset wildcard

Bob Sneidar bobsneidar at
Mon Apr 19 14:13:41 EDT 2021

Why even embed the function? 

put "local" & tString & functionName() into tSearchString
set wholeMatches to true
put lineOffset(tSearchString) into tLine

Or am I misunderstanding the problem (again)? :-)

Bob S

> On Apr 19, 2021, at 11:04 , J. Landman Gay via use-livecode <use-livecode at> wrote:
> On 4/19/21 11:29 AM, Mark Wieder via use-livecode wrote:
>> I'm sure I'm missing something simple here but...
>> I need to use a wildcard in the lineOffset function but I can't seem to find the correct invocation.
>> put lineoffset("local*"&tFunctionName, tScript) into tPos
>> always returns zero
>> put lineoffset(tFunctionName, tScript) into tPos
>> of course returns a line number, but possibly not the right one
>> put lineoffset("local"&&tFunctionName, tScript) into tPos
>> gives me the correct line in some cases but fails for
>> local tSomeFunction,tOtherFunction
>> Can anyone give me the correct syntax for using a wildcard string as an argument to lineOffset? Thanks in advance - I've spent enough time on my own trying to figger this out.
> I don't think lineoffset supports wildcards, but you could do it with matchChunk.
> -- 
> Jacqueline Landman Gay         |     jacque at
> HyperActive Software           |

More information about the use-livecode mailing list